|
|
|
@ -1,25 +1,19 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
|
<el-input v-model="dataForm.site" readonly style="width: 120px;"></el-input> |
|
|
|
<el-input v-model="dataForm.site" readonly style="width: 120px;" onkeyup="this.value = this.value.toUpperCase()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'采购订单号:'"> |
|
|
|
<el-input v-model="dataForm.orderNo" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 30px"> |
|
|
|
<el-button @click="getDataList()" type="primary" style="width: 80px;margin-left: 290px;">列表</el-button> |
|
|
|
<el-input v-model="dataForm.orderNo" style="width: 120px;" onkeyup="this.value = this.value.toUpperCase()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'供应商编号:'"> |
|
|
|
<el-input v-model="dataForm.supplierID" @change="getSupplier()" style="width: 120px;"></el-input> |
|
|
|
<el-input v-model="dataForm.supplierID" @change="getSupplier()" style="width: 120px;" onkeyup="this.value = this.value.toUpperCase()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'供应商名称:'"> |
|
|
|
<el-input v-model="dataForm.supplierName" readonly style="width: 255px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 30px"> |
|
|
|
<el-button @click="saveCRoll()" type="primary" style="width: 80px;margin-left: 155px;">创建</el-button> |
|
|
|
<el-button @click="saveCRoll()" type="primary" style="width: 80px;margin-left: 20px;">创建</el-button> |
|
|
|
<el-button @click="getDataList()" type="primary" style="width: 80px;">列表</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
@ -27,7 +21,7 @@ |
|
|
|
<el-input v-model="dataForm.partNo" @change="getPartNo2()" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'物料名称:'"> |
|
|
|
<el-input v-model="dataForm.partDescription" readonly style="width: 120px;"></el-input> |
|
|
|
<el-input v-model="dataForm.partDescription" readonly style="width: 195px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'规格型号:'"> |
|
|
|
<el-input v-model="dataForm.spec" readonly style="width: 180px;"></el-input> |
|
|
|
@ -35,8 +29,6 @@ |
|
|
|
<!-- <el-form-item style="margin-top: 30px">--> |
|
|
|
<!-- <el-button @click="modelFlag=false" type="primary" style="width: 80px;margin-left: 95px;">关闭</el-button>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'接收日期:'"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 120px" |
|
|
|
@ -44,32 +36,32 @@ |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
<el-button @click="getSaveModel()" type="primary" style="margin-left: 20px;">供应商批号录入</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'送货单号:'" style=""> |
|
|
|
<el-input v-model="dataForm.suppDeliveryNote" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 30px;margin-left: 135px"> |
|
|
|
<el-button @click="getSaveModel()" type="primary" style="margin-left: 142px;">供应商批号录入</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'每卷数量:'"> |
|
|
|
<el-input v-model="dataForm.rollQty" type="number" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'卷数:'"> |
|
|
|
<el-input v-model="dataForm.rollNumber" type="number" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 30px"> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="insertData()" type="primary">插入</el-button> |
|
|
|
<el-checkbox style="margin-left: 108px" v-model="dataForm.checked">自动打印标签</el-checkbox> |
|
|
|
<el-checkbox style="margin-left: 60px" v-model="dataForm.checked">自动打印标签</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'客户编号:'"> |
|
|
|
<el-input v-model="dataForm.customerID" @change="getCustomerID()" style="width: 120px;"></el-input> |
|
|
|
<el-input v-model="dataForm.customerID" style="width: 120px;"></el-input> |
|
|
|
<!-- @change="getCustomerID()"--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'产品编码:'"> |
|
|
|
<el-input v-model="dataForm.fGPartNo" @change="getPartNo()" style="width: 120px;"></el-input> |
|
|
|
<el-input v-model="dataForm.fGPartNo" style="width: 120px;"></el-input> |
|
|
|
<!-- @change="getPartNo()"--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'参照名称:'"> |
|
|
|
<el-input v-model="dataForm.referencePartDesc" readonly style="width: 120px;"></el-input> |
|
|
|
@ -81,12 +73,12 @@ |
|
|
|
<el-input v-model="dataForm.supplierName" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-tabs v-model="activeName" style="font-size: 11px;width: 775px"> |
|
|
|
<el-tabs v-model="activeName" style="font-size: 11px;width: 1200px"> |
|
|
|
<el-tab-pane label="待分卷" name="first"> |
|
|
|
<div style="width: 800px;margin-top: 8px;"> |
|
|
|
<div style="width: 1000px;margin-top: 0px;"> |
|
|
|
<div style="width: 100%;float: left"> |
|
|
|
<el-table |
|
|
|
height="200" |
|
|
|
:height="height" |
|
|
|
:data="dataList1" |
|
|
|
border |
|
|
|
:vertical-align="'middle'" |
|
|
|
@ -110,7 +102,7 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<span style="margin-left: 5px">合计:卷数</span> |
|
|
|
<span style="margin-left: 5px;">合计:卷数</span> |
|
|
|
<el-input v-model="sum1" style="width: 50px;" readonly></el-input> |
|
|
|
<span>总数量</span> |
|
|
|
<el-input v-model="sum2" style="width: 80px;" readonly></el-input> |
|
|
|
@ -118,9 +110,9 @@ |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="已分卷" name="second"> |
|
|
|
<div style="width: 760px;margin-top: 0px"> |
|
|
|
<div style="width: 1000px;margin-top: 0px"> |
|
|
|
<el-table |
|
|
|
height="200" |
|
|
|
:height="height" |
|
|
|
:data="dataList3" |
|
|
|
border |
|
|
|
:vertical-align="'middle'" |
|
|
|
@ -136,12 +128,12 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
|
<div style="margin-top: 8px"> |
|
|
|
|
|
|
|
<span style="margin-left: 5px">合计:卷数</span> |
|
|
|
<el-input v-model="sum3" style="width: 50px;" readonly></el-input> |
|
|
|
<span>总卷数量</span> |
|
|
|
<el-input v-model="sum4" style="width: 80px;" readonly></el-input> |
|
|
|
</div> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
@ -477,7 +469,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
columnWidth: 80 |
|
|
|
columnWidth: 250 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -495,7 +487,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
columnWidth: 150 |
|
|
|
columnWidth: 250 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -513,7 +505,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
columnWidth: 100 |
|
|
|
columnWidth: 250 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -531,7 +523,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
columnWidth: 150 |
|
|
|
columnWidth: 249 |
|
|
|
} |
|
|
|
], |
|
|
|
columnList3: [ |
|
|
|
@ -684,7 +676,7 @@ |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 200; |
|
|
|
this.height = window.innerHeight - 360; |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -755,14 +747,87 @@ |
|
|
|
this.sum2 += newDate.allRollQty; |
|
|
|
}, |
|
|
|
saveCRoll() { |
|
|
|
if (this.dataList1.length == 0) { |
|
|
|
this.$alert("没有待分卷信息!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
let bool = false |
|
|
|
let inData = { |
|
|
|
site: this.dataForm.site, |
|
|
|
partNo: this.dataForm.partNo |
|
|
|
} |
|
|
|
getPartNoDetail(inData).then(({data}) => { |
|
|
|
if (data.total > 0) { |
|
|
|
this.dataForm.partDescription=data.rows[0].partDescription; |
|
|
|
//this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
let inData2={ |
|
|
|
|
|
|
|
site : this.dataForm.site, |
|
|
|
supplierID : this.dataForm.supplierID |
|
|
|
} |
|
|
|
getSupplierDetail(inData2).then(({data}) => { |
|
|
|
let outList = data.rows |
|
|
|
if (outList.length>0){ |
|
|
|
this.dataForm.supplierName=outList[0].supplierName; |
|
|
|
// this.$set(this.dataForm,'supplierName',outList[0].supplierName) |
|
|
|
let inData3 = { |
|
|
|
site: this.dataForm.site, |
|
|
|
partNo: this.dataForm.fGPartNo |
|
|
|
} |
|
|
|
getPartNoDetail(inData3).then(({data}) => { |
|
|
|
if (data.total > 0) { |
|
|
|
} else { |
|
|
|
bool = true; |
|
|
|
} |
|
|
|
}) |
|
|
|
if (bool){ |
|
|
|
this.dataForm.fGPartNo = ''; |
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
this.$alert('该物料编码不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let inData4 = { |
|
|
|
site: this.dataForm.site, |
|
|
|
configurationTemplateID: this.dataForm.customerID, |
|
|
|
} |
|
|
|
checkCustomerID(inData4).then(({data}) => { |
|
|
|
if (data.total > 0) { |
|
|
|
if (this.dataList1.length == 0) { |
|
|
|
this.$alert("没有待分卷信息!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
}else { |
|
|
|
this.doSaveCRoll() |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.dataForm.customerID = ''; |
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
this.$alert('该客户编号不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
else { |
|
|
|
this.dataForm.supplierName=''; |
|
|
|
this.dataForm.supplierID=''; |
|
|
|
this.$alert('该供应商不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
else { |
|
|
|
this.dataForm.partNo = ''; |
|
|
|
this.$alert('该物料编码不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.doSaveCRoll() |
|
|
|
|
|
|
|
}, |
|
|
|
doSaveCRoll() { |
|
|
|
@ -814,6 +879,7 @@ |
|
|
|
this.$alert('该物料编码不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -826,13 +892,13 @@ |
|
|
|
if (data.total > 0) { |
|
|
|
this.dataForm.partDescription=data.rows[0].partDescription; |
|
|
|
//this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
} else { |
|
|
|
this.dataForm.partNo = ''; |
|
|
|
// this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
this.$alert('该物料编码不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
// else { |
|
|
|
// this.dataForm.partNo = ''; |
|
|
|
// this.$alert('该物料编码不存在', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCustomerID() { |
|
|
|
@ -848,6 +914,7 @@ |
|
|
|
this.$alert('该客户编号不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -861,13 +928,14 @@ |
|
|
|
if (outList.length>0){ |
|
|
|
this.dataForm.supplierName=outList[0].supplierName; |
|
|
|
// this.$set(this.dataForm,'supplierName',outList[0].supplierName) |
|
|
|
}else { |
|
|
|
this.dataForm.supplierName=''; |
|
|
|
this.dataForm.supplierID=''; |
|
|
|
this.$alert('该供应商不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
// else { |
|
|
|
// this.dataForm.supplierName=''; |
|
|
|
// this.dataForm.supplierID=''; |
|
|
|
// this.$alert('该供应商不存在', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
//供应商批号录入 |
|
|
|
|