Commit 344c58c8 by liangjianmin

style: 优化代码格式,提升可读性

parent 8105f669
......@@ -44,6 +44,7 @@ const InOutStockLog = resolve => require(['@/views/consignmentManagement/inOutSt
const ReconciledBill = resolve => require(['@/views/billManagement/reconciledBill.vue'], resolve);
const ReconciledBillDetail = resolve => require(['@/views/billManagement/reconciledBillDetail.vue'], resolve);
const AllPayableBills = resolve => require(['@/views/billManagement/allPayableBills.vue'], resolve);
const fileManagement = resolve => require(['@/views/billManagement/fileManagement.vue'], resolve);
const routes = [
{path: '/', name: 'Index', meta: {title: '概况'}, component: Home},
......@@ -87,6 +88,7 @@ const routes = [
{path: '/reconciledBill', name: 'reconciledBill', meta: {title: '对账单'}, component: ReconciledBill},
{path: '/reconciledBillDetail', name: 'reconciledBillDetail', meta: {title: '对账单详情'}, component: ReconciledBillDetail},
{path: '/allPayableBills', name: 'allPayableBills', meta: {title: '全部应付单'}, component: AllPayableBills},
{path: '/fileManagement', name: 'fileManagement', meta: {title: '文件管理'}, component: fileManagement},
{path: '*', redirect: '/'}
]
......
......@@ -54,23 +54,23 @@
<!-- 采购组织为“深贸电子”时,下载猎芯合同有中文,英文两种选择;列表有中文,英文两行,列表按钮分别为“上传PI,上传合同” -->
<div v-if="infos.company_id==2 && infos.status!=4 && infos.status!=-3 && scope.row.status ==1">
<el-button type="primary" v-if=" scope.row.contractFileUrl!='' " @click="delContract(scope.row)" >
<el-button type="primary" v-if=" scope.row.contractFileUrl!='' " @click="delContract(scope.row)">
<span>删除合同</span>
</el-button>
<el-upload v-else-if=" scope.row.languageType=='中文' " :headers="{ Authorization: 'Bearer ' + token }" :data="{supplier_id:supplier_id,contract_id:scope.row.contractId,type:'upload'}" :action="uploadUrl" :on-success="handleUploadSuccess" >
<el-upload v-else-if=" scope.row.languageType=='中文' " :headers="{ Authorization: 'Bearer ' + token }" :data="{supplier_id:supplier_id,contract_id:scope.row.contractId,type:'upload'}" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button type="primary">上传PI</el-button>
</el-upload>
<el-upload v-else-if=" scope.row.languageType=='英文' " :headers="{ Authorization: 'Bearer ' + token }" :data="{supplier_id:supplier_id,contract_id:scope.row.contractId,type:'upload'}" :action="uploadUrl" :on-success="handleUploadSuccess" >
<el-upload v-else-if=" scope.row.languageType=='英文' " :headers="{ Authorization: 'Bearer ' + token }" :data="{supplier_id:supplier_id,contract_id:scope.row.contractId,type:'upload'}" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button type="primary">上传合同</el-button>
</el-upload>
</div>
<!-- 采购组织为“猎芯科技”时,下载猎芯合同只能选择中文,列表也只有中文一行,列表按钮为“上传合同” -->
<div v-if="infos.company_id==1 && infos.status!=4 && infos.status!=-3 && scope.row.status ==1">
<el-button type="primary" v-if=" scope.row.contractFileUrl!='' " @click="delContract(scope.row)" >
<el-button type="primary" v-if=" scope.row.contractFileUrl!='' " @click="delContract(scope.row)">
<span>删除合同</span>
</el-button>
<el-upload v-else-if=" scope.row.languageType=='中文' " :headers="{ Authorization: 'Bearer ' + token }" :data="{supplier_id:supplier_id,contract_id:scope.row.contractId,type:'upload'}" :action="uploadUrl" :on-success="handleUploadSuccess" >
<el-upload v-else-if=" scope.row.languageType=='中文' " :headers="{ Authorization: 'Bearer ' + token }" :data="{supplier_id:supplier_id,contract_id:scope.row.contractId,type:'upload'}" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button type="primary">上传合同</el-button>
</el-upload>
</div>
......@@ -127,8 +127,8 @@ export default {
fileData: {
token: this.token,
contract_id: 0,
oss_file_id: '',
},
oss_file_id: ''
}
};
},
created() {
......@@ -159,15 +159,15 @@ export default {
this.contractData = res.data.pur_contract_list || [];
// 1猎芯科技,2深茂电子
if( this.infos.company_id == 1 ){
if (this.infos.company_id == 1) {
this.langOptions = [
{ label: '中文', value: 1 },
{ label: '中文', value: 1 }
];
this.selectedLang = 1;
}else{
} else {
this.langOptions = [
{ label: '中文', value: 2 },
{ label: '英文', value: 3 },
{ label: '英文', value: 3 }
];
this.selectedLang = 2;
}
......@@ -185,7 +185,7 @@ export default {
if (file.code === 0) {
this.$message({
message: '上传成功',
type: 'success',
type: 'success'
});
window.location.reload();
} else {
......@@ -202,13 +202,13 @@ export default {
console.log(this.selectedLang);
let pdf_url = ""
if( this.selectedLang == 1 ){
if (this.selectedLang == 1) {
pdf_url = "/api/purContract/pdf";
}
if( this.selectedLang == 2 ){
if (this.selectedLang == 2) {
pdf_url = "/api/purContract/pdfHk";
}
if( this.selectedLang == 3 ){
if (this.selectedLang == 3) {
pdf_url = "/api/purContract/pdfUs";
}
......@@ -225,19 +225,19 @@ export default {
},
// 3 删除合同
delContract(contractItem){
delContract(contractItem) {
this.$http('post', "/api/purContract/updateOrderContract", {
contract_id:contractItem.contractId,
type:'delete',
contract_id: contractItem.contractId,
type: 'delete'
}).then(res => {
console.log(res);
if( res.code === 0 ){
if (res.code === 0) {
this.$message({
message: '删除成功',
type: 'success',
type: 'success'
});
window.location.reload();
}else{
} else {
this.$message({
message: file.msg,
type: 'warning'
......@@ -245,7 +245,7 @@ export default {
}
})
},
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment