|
|
|
@ -12,9 +12,8 @@ |
|
|
|
<el-option label="是" value="Y"></el-option> |
|
|
|
<el-option label="否" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-button @click="getData()" type="primary" style="margin-left: 10px;margin-top: 0px">{{'查询'}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-button @click="getData()" type="primary" style="margin-left: 100px;margin-top: 33px">{{'查询'}}</el-button> |
|
|
|
<el-button @click="showModel()" type="primary" style="margin-left: 100px;margin-top: 33px">{{'创建卷'}}</el-button> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
@ -22,6 +21,15 @@ |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="70" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="showModel(scope.row)">创建卷</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -39,103 +47,109 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-dialog width="800px" title="数据维护" :close-on-click-modal="false" v-drag :visible.sync="modelFlag"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|
|
|
<el-form-item :label="'工厂编号:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-dialog width="800px" :title="'数据维护'" :close-on-click-modal="false" v-drag :visible.sync="modelFlag"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
|
<el-input v-model="dataForm.site" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'关联单号1:'" > |
|
|
|
<el-input v-model="dataForm.orderRef1" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'关联单号1:'"> |
|
|
|
<el-input v-model="dataForm.orderNo" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'关联单号3:'" > |
|
|
|
<el-input v-model="dataForm.orderRef3" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'关联单号3:'"> |
|
|
|
<el-input v-model="dataForm.orderItemNo" readonly 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: 155px;">列表</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.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'供应商编号:'"> |
|
|
|
<el-input v-model="dataForm.supplierID" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'供应商名称:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 255px;" ></el-input> |
|
|
|
<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="getDataList()" type="primary" style="width: 80px;margin-left: 155px;">创建</el-button> |
|
|
|
<el-button @click="saveCRoll()" type="primary" style="width: 80px;margin-left: 155px;">创建</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.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'物料编码:'"> |
|
|
|
<el-input v-model="dataForm.partNo" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'物料名称:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'物料名称:'"> |
|
|
|
<el-input v-model="dataForm.partDescription" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'规格型号:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 180px;" ></el-input> |
|
|
|
<el-form-item :label="'规格型号:'"> |
|
|
|
<el-input v-model="dataForm.spec" readonly style="width: 180px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 30px"> |
|
|
|
<el-button @click="getDataList()" type="primary" style="width: 80px;margin-left: 95px;">关闭</el-button> |
|
|
|
<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-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'接收日期:'"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 120px" |
|
|
|
v-model="dataForm.receive" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'送货单号:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'送货单号:'"> |
|
|
|
<el-input v-model="dataForm.suppDeliveryNote" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'订单数量:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'订单数量:'"> |
|
|
|
<el-input v-model="dataForm.quantity" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 30px"> |
|
|
|
<el-button @click="getDataList()" type="primary" style="margin-left: 142px;">供应商批号录入</el-button> |
|
|
|
<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.site" style="width: 120px;" ></el-input> |
|
|
|
<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.site" style="width: 120px;" ></el-input> |
|
|
|
<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-button @click="getDataList()" type="primary">插入</el-button> |
|
|
|
<el-switch |
|
|
|
v-model="value1" |
|
|
|
active-color="#13ce66" |
|
|
|
inactive-color="#ff4949" |
|
|
|
active-value="Y" |
|
|
|
inactive-value="N" |
|
|
|
style="margin-left: 73px"> |
|
|
|
</el-switch> |
|
|
|
<span>{{'自动打印标签'}}</span> |
|
|
|
<el-button @click="insertData()" type="primary">插入</el-button> |
|
|
|
<!-- <el-switch--> |
|
|
|
<!-- v-model="value1"--> |
|
|
|
<!-- active-color="#13ce66"--> |
|
|
|
<!-- inactive-color="#ff4949"--> |
|
|
|
<!-- active-value="Y"--> |
|
|
|
<!-- inactive-value="N"--> |
|
|
|
<!-- style="margin-left: 73px">--> |
|
|
|
<!-- </el-switch>--> |
|
|
|
<!-- <span>{{'自动打印标签'}}</span>--> |
|
|
|
<el-checkbox style="margin-left: 108px" v-model="dataForm.checked">自动打印标签</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'材料编码:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'材料编码:'"> |
|
|
|
<el-input v-model="dataForm.XX" style="width: 120px;"></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.site" style="width: 120px;" ></el-input> |
|
|
|
<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-form-item> |
|
|
|
<el-form-item :label="'产品编码:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'产品编码:'"> |
|
|
|
<el-input v-model="dataForm.fGPartNo" @change="getPartNo()" style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'参照名称:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'参照名称:'"> |
|
|
|
<el-input v-model="dataForm.referencePartDesc" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'供应商编码:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'供应商编码:'"> |
|
|
|
<el-input v-model="dataForm.supplierID" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'供应商名称:'" > |
|
|
|
<el-input v-model="dataForm.site" style="width: 120px;" ></el-input> |
|
|
|
<el-form-item :label="'供应商名称:'"> |
|
|
|
<el-input v-model="dataForm.supplierName" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-tabs v-model="activeName" > |
|
|
|
<el-tabs v-model="activeName" style="font-size: 11px"> |
|
|
|
<el-tab-pane label="待分卷" name="first"> |
|
|
|
<div style="width: 775px"> |
|
|
|
<div style="width: 775px;margin-top: 8px;"> |
|
|
|
<div style="width: 40%;float: left"> |
|
|
|
<el-table |
|
|
|
height="200" |
|
|
|
@ -166,6 +180,7 @@ |
|
|
|
height="200" |
|
|
|
:data="dataList2" |
|
|
|
border |
|
|
|
@row-dblclick="changeData" |
|
|
|
:vertical-align="'middle'" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
@ -186,10 +201,16 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<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> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="已分卷" name="second"> |
|
|
|
<div style="width: 760px"> |
|
|
|
<div style="width: 760px;margin-top: 0px"> |
|
|
|
<el-table |
|
|
|
height="200" |
|
|
|
:data="dataList3" |
|
|
|
@ -202,24 +223,59 @@ |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:align="item.align" |
|
|
|
:vertical-align="'middle'" |
|
|
|
:min-width="item.width" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
</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> |
|
|
|
</el-tabs> |
|
|
|
<el-footer style="height:10px;margin-top: 0px;text-align:center" > |
|
|
|
<el-footer style="height:10px;margin-top: 0px;text-align:center"> |
|
|
|
|
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog width="430px" :title="'供应商批号录入'" :close-on-click-modal="false" v-drag :visible.sync="modelFlag2"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'工厂编码:'"> |
|
|
|
<el-input v-model="saveData.site" style="width: 80px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'卷号:'"> |
|
|
|
<el-input v-model="saveData.rollNo" style="width: 150px"></el-input> |
|
|
|
<el-button @click="goSaveSuppRollNo()" type="primary" style="margin-left: 10px;">保存</el-button> |
|
|
|
<el-button @click="modelFlag2=false" type="primary" style="margin-left: 10px;">关闭</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="saveData.suppRollNo" style="width: 369px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:10px;margin-top: 20px;text-align:center"> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
searchSAPPurchaseOrder, |
|
|
|
searchCRollInfoDetail, |
|
|
|
saveCRollData, |
|
|
|
saveSuppRollNo, |
|
|
|
doSaveSuppRollNo, |
|
|
|
} from "@/api/purchasingManagement/materialSplit.js" |
|
|
|
import { |
|
|
|
getPartNoDetail, |
|
|
|
checkCustomerID |
|
|
|
} from "@/api/base/site.js" |
|
|
|
|
|
|
|
export default { |
|
|
|
//查询-SAP采购订单 |
|
|
|
@ -227,26 +283,49 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
height: 200, |
|
|
|
modelFlag:false, |
|
|
|
modelInputFlag:true, |
|
|
|
selectList:[], |
|
|
|
activeName:'first', |
|
|
|
buttons:{ |
|
|
|
search:'查询', |
|
|
|
modelFlag: false, |
|
|
|
modelFlag2: false, |
|
|
|
modelInputFlag: true, |
|
|
|
selectList: [], |
|
|
|
activeName: 'first', |
|
|
|
buttons: { |
|
|
|
search: '查询', |
|
|
|
}, |
|
|
|
searchData: { |
|
|
|
site:'', |
|
|
|
orderNo:'', |
|
|
|
slittedFlag:'N', |
|
|
|
user:this.$store.state.user.name |
|
|
|
site: '', |
|
|
|
orderNo: '', |
|
|
|
slittedFlag: 'Y', |
|
|
|
user: this.$store.state.user.name |
|
|
|
}, |
|
|
|
dataForm:{ |
|
|
|
site:'', |
|
|
|
saveData: {}, |
|
|
|
dataForm: { |
|
|
|
site: '', |
|
|
|
orderNo: '', |
|
|
|
orderItemNo: '', |
|
|
|
supplierID: '', |
|
|
|
supplierName: '', |
|
|
|
partNo: '', |
|
|
|
partDescription: '', |
|
|
|
spec: '', |
|
|
|
receive: '', |
|
|
|
suppDeliveryNote: '', |
|
|
|
quantity: '', |
|
|
|
rollQty: '', |
|
|
|
rollNumber: '', |
|
|
|
customerID: '', |
|
|
|
fGPartNo: '', |
|
|
|
referencePartDesc: '', |
|
|
|
checked: false, |
|
|
|
XX: '', |
|
|
|
}, |
|
|
|
dataList:[], |
|
|
|
dataList3:[], |
|
|
|
dataList2:[], |
|
|
|
dataList1:[], |
|
|
|
sum1: '', |
|
|
|
sum2: '', |
|
|
|
sum3: '', |
|
|
|
sum4: '', |
|
|
|
dataList: [], |
|
|
|
dataList3: [], |
|
|
|
dataList2: [], |
|
|
|
dataList1: [], |
|
|
|
dataListLoading: false, |
|
|
|
columnList: [ |
|
|
|
{ |
|
|
|
@ -484,16 +563,16 @@ |
|
|
|
columnWidth: 70 |
|
|
|
} |
|
|
|
], |
|
|
|
columnList1:[ |
|
|
|
columnList1: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table1Site', |
|
|
|
serialNumber: '6032Table1Number', |
|
|
|
tableId: "6032Table1", |
|
|
|
tableName: "查询SAP采购订单待分卷左表", |
|
|
|
columnProp: "site", |
|
|
|
columnProp: "number", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
align: "right", |
|
|
|
columnLabel: "次序号", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
@ -506,10 +585,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table1XXX', |
|
|
|
serialNumber: '6032Table1RollQty', |
|
|
|
tableId: "6032Table1", |
|
|
|
tableName: "查询SAP采购订单待分卷左表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "rollQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "每卷数量", |
|
|
|
@ -524,10 +603,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table1XXX', |
|
|
|
serialNumber: '6032Table1RollNumber', |
|
|
|
tableId: "6032Table1", |
|
|
|
tableName: "查询SAP采购订单待分卷左表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "rollNumber", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "卷数", |
|
|
|
@ -542,10 +621,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table1XXX', |
|
|
|
serialNumber: '6032Table1ALLRollQty', |
|
|
|
tableId: "6032Table1", |
|
|
|
tableName: "查询SAP采购订单待分卷左表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "allRollQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "总数量", |
|
|
|
@ -558,14 +637,14 @@ |
|
|
|
columnWidth: 80 |
|
|
|
} |
|
|
|
], |
|
|
|
columnList2:[ |
|
|
|
columnList2: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table2XXX', |
|
|
|
serialNumber: '6032Table2PartNo', |
|
|
|
tableId: "6032Table2", |
|
|
|
tableName: "查询SAP采购订单待分卷右表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "partNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "物料编码", |
|
|
|
@ -580,10 +659,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table2XXX', |
|
|
|
serialNumber: '6032Table2PartDescription', |
|
|
|
tableId: "6032Table2", |
|
|
|
tableName: "查询SAP采购订单待分卷右表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "partDescription", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "物料名称", |
|
|
|
@ -598,10 +677,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table2XXX', |
|
|
|
serialNumber: '6032Table2OrderItemNo', |
|
|
|
tableId: "6032Table2", |
|
|
|
tableName: "查询SAP采购订单待分卷右表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "orderItemNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "订单序号", |
|
|
|
@ -616,10 +695,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032Table2XXX', |
|
|
|
serialNumber: '6032Table2Quantity', |
|
|
|
tableId: "6032Table2", |
|
|
|
tableName: "查询SAP采购订单待分卷右表", |
|
|
|
columnProp: "XX", |
|
|
|
columnProp: "quantity", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "订单数量", |
|
|
|
@ -632,14 +711,14 @@ |
|
|
|
columnWidth: 80 |
|
|
|
} |
|
|
|
], |
|
|
|
columnList3:[ |
|
|
|
columnList3: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3RollNo', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "rollNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "卷号", |
|
|
|
@ -654,10 +733,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3RollQty', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "rollQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "卷数量", |
|
|
|
@ -667,15 +746,15 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
columnWidth: 40 |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3SuppDeliveryNote', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "suppDeliveryNote", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "供应商送货单号", |
|
|
|
@ -690,10 +769,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3RollDate', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "rollDate", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "入库日期", |
|
|
|
@ -708,10 +787,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3CreatedDate', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "createdDate", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "分卷日期", |
|
|
|
@ -726,10 +805,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3CreatedBy', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "createdBy", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "分卷人", |
|
|
|
@ -744,10 +823,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3SuppRollNoFlag', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "suppRollNoFlag", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "已录入供应商批号", |
|
|
|
@ -762,10 +841,10 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 6032, |
|
|
|
serialNumber: '6032TableXXX', |
|
|
|
serialNumber: '6032Table3SuppRollNo', |
|
|
|
tableId: "6032Table", |
|
|
|
tableName: "查询SAP采购订单已分卷表", |
|
|
|
columnProp: "XXX", |
|
|
|
columnProp: "suppRollNo", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "供应商批号", |
|
|
|
@ -775,7 +854,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false, |
|
|
|
columnWidth: 100 |
|
|
|
columnWidth: 300 |
|
|
|
} |
|
|
|
], |
|
|
|
} |
|
|
|
@ -787,10 +866,41 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
showModel(){ |
|
|
|
this.modelFlag=true; |
|
|
|
showModel(row) { |
|
|
|
this.dataList1 = []; |
|
|
|
this.sum1 = 0; |
|
|
|
this.sum2 = 0; |
|
|
|
this.sum3 = 0; |
|
|
|
this.sum4 = 0; |
|
|
|
this.dataForm = JSON.parse(JSON.stringify(row)) |
|
|
|
var year = new Date().getFullYear(); //获取完整的年份(4位,1970-????) |
|
|
|
var month = new Date().getMonth() + 1; //获取当前月份(0-11,0代表1月) |
|
|
|
var day = new Date().getDate(); //获取当前日(1-31) |
|
|
|
if (month < 10) { |
|
|
|
month = "0" + month; |
|
|
|
} |
|
|
|
if (day < 10) { |
|
|
|
day = "0" + day; |
|
|
|
} |
|
|
|
var dateString = year + "-" + month + "-" + day; |
|
|
|
this.$set(this.dataForm, 'receive', dateString) |
|
|
|
this.dataForm.referencePartDesc = this.dataForm.partNo; |
|
|
|
let inData = { |
|
|
|
site: row.site, |
|
|
|
orderRef1: row.orderNo, |
|
|
|
orderRef2: row.orderItemNo, |
|
|
|
} |
|
|
|
searchCRollInfoDetail(inData).then(({data}) => { |
|
|
|
this.dataList3 = data.rows |
|
|
|
for (let i = 0; i < data.total; i++) { |
|
|
|
this.sum4 += this.dataList3[i].rollQty; |
|
|
|
} |
|
|
|
this.sum3 = data.total; |
|
|
|
}) |
|
|
|
this.getAllThePartNo(); |
|
|
|
this.modelFlag = true; |
|
|
|
}, |
|
|
|
getData(){ |
|
|
|
getData() { |
|
|
|
// if(this.searchData.slittedFlag==null||this.searchData.slittedFlag==''){ |
|
|
|
// this.$alert("数据量过大,请输入采购单号查询!",'错误',{ |
|
|
|
// confirmButtonText:'确定' |
|
|
|
@ -801,14 +911,292 @@ |
|
|
|
this.dataList = data.rows |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
insertData() { |
|
|
|
if (this.dataForm.suppDeliveryNote == '' || this.dataForm.suppDeliveryNote == null) { |
|
|
|
this.$alert("请输入送货单号!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (this.dataForm.rollQty == '' || this.dataForm.rollQty == null || this.dataForm.rollQty <= 0) { |
|
|
|
this.$alert("请输入正确的每卷数量!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (this.dataForm.rollNumber == '' || this.dataForm.rollQty == null || this.dataForm.rollNumber <= 0) { |
|
|
|
this.$alert("请输入正确的卷数!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let newDate = { |
|
|
|
number: this.dataList1.length + 1, |
|
|
|
allRollQty: this.dataForm.rollQty * this.dataForm.rollNumber, |
|
|
|
site: this.dataForm.site, |
|
|
|
rollQty: this.dataForm.rollQty, |
|
|
|
rollNumber: this.dataForm.rollNumber, |
|
|
|
partNo: this.dataForm.partNo, |
|
|
|
supplierID: this.dataForm.supplierID, |
|
|
|
orderRef1: this.dataForm.orderNo, |
|
|
|
orderRef2: this.dataForm.orderNo, |
|
|
|
orderRef3: this.dataForm.orderItemNo, |
|
|
|
orderRef4: 'P', |
|
|
|
suppDeliveryNote: this.dataForm.suppDeliveryNote, |
|
|
|
rollDate: this.dataForm.receive, |
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
statusDb: 'N', |
|
|
|
status: '未入库', |
|
|
|
suppRollNoFlag: 'N', |
|
|
|
sourceType: '采购入库', |
|
|
|
rolltype: '合格卷', |
|
|
|
rolltypeDb: 0, |
|
|
|
parttypeFlag: 'R', |
|
|
|
customerID: this.dataForm.customerID, |
|
|
|
fGPartNo: this.dataForm.fGPartNo, |
|
|
|
} |
|
|
|
this.dataList1.push(newDate) |
|
|
|
this.sum1 += newDate.rollNumber; |
|
|
|
this.sum2 += newDate.allRollQty; |
|
|
|
}, |
|
|
|
saveCRoll() { |
|
|
|
if (this.dataList1.length == 0) { |
|
|
|
this.$alert("没有待分卷信息!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (this.sum2 + this.sum4 < this.dataForm.quantity) { |
|
|
|
this.$confirm(`累计分切数量小于订单数量,是否继续?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.doSaveCRoll() |
|
|
|
}) |
|
|
|
} |
|
|
|
if (this.sum2 + this.sum4 > this.dataForm.quantity) { |
|
|
|
this.$confirm(`累计分切数量大于订单数量,是否继续?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.doSaveCRoll() |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
doSaveCRoll() { |
|
|
|
saveCRollData(this.dataList1).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.dataList1 = []; |
|
|
|
this.sum1 = 0; |
|
|
|
this.sum2 = 0; |
|
|
|
let inData = { |
|
|
|
site: this.dataForm.site, |
|
|
|
orderRef1: this.dataForm.orderNo, |
|
|
|
orderRef2: this.dataForm.orderItemNo, |
|
|
|
} |
|
|
|
searchCRollInfoDetail(inData).then(({data}) => { |
|
|
|
this.dataList3 = data.rows |
|
|
|
for (let i = 0; i < data.total; i++) { |
|
|
|
this.sum4 += this.dataList3[i].rollQty; |
|
|
|
} |
|
|
|
this.sum3 = data.total; |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getPartNo() { |
|
|
|
let inData = { |
|
|
|
site: this.dataForm.site, |
|
|
|
partNo: this.dataForm.fGPartNo |
|
|
|
} |
|
|
|
getPartNoDetail(inData).then(({data}) => { |
|
|
|
if (data.total > 0) { |
|
|
|
} else { |
|
|
|
this.dataForm.fGPartNo = ''; |
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
this.$alert('该物料编码不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCustomerID() { |
|
|
|
let inData = { |
|
|
|
site: this.dataForm.site, |
|
|
|
configurationTemplateID: this.dataForm.customerID, |
|
|
|
} |
|
|
|
checkCustomerID(inData).then(({data}) => { |
|
|
|
if (data.total > 0) { |
|
|
|
} else { |
|
|
|
this.dataForm.customerID = ''; |
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataForm)); |
|
|
|
this.$alert('该客户编号不存在', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getAllThePartNo() { |
|
|
|
let list = []; |
|
|
|
for (let i = 0; i < this.dataList.length; i++) { |
|
|
|
if (this.dataList[i].partNo == this.dataForm.partNo) { |
|
|
|
list.push(this.dataList[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataList2 = list; |
|
|
|
}, |
|
|
|
//双击切换订单 |
|
|
|
changeData(row) { |
|
|
|
if (this.dataList1.length > 0) { |
|
|
|
this.$confirm(`切换订单将会清空待分卷信息,是否继续?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.sum1 = 0; |
|
|
|
this.sum2 = 0; |
|
|
|
this.sum3 = 0; |
|
|
|
this.sum4 = 0; |
|
|
|
this.dataList1 = []; |
|
|
|
this.dataForm = row; |
|
|
|
this.dataForm.referencePartDesc = this.dataForm.partNo; |
|
|
|
this.$set(this.dataForm, 'receive', new Date()); |
|
|
|
let inData = { |
|
|
|
site: this.dataForm.site, |
|
|
|
orderRef1: this.dataForm.orderNo, |
|
|
|
orderRef2: this.dataForm.orderItemNo, |
|
|
|
} |
|
|
|
searchCRollInfoDetail(inData).then(({data}) => { |
|
|
|
this.dataList3 = data.rows |
|
|
|
for (let i = 0; i < data.total; i++) { |
|
|
|
this.sum4 += this.dataList3[i].rollQty; |
|
|
|
} |
|
|
|
this.sum3 = data.total; |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.sum1 = 0; |
|
|
|
this.sum2 = 0; |
|
|
|
this.sum3 = 0; |
|
|
|
this.sum4 = 0; |
|
|
|
this.dataList1 = []; |
|
|
|
this.dataForm = row; |
|
|
|
this.dataForm.referencePartDesc = this.dataForm.partNo; |
|
|
|
this.$set(this.dataForm, 'receive', new Date()); |
|
|
|
let inData = { |
|
|
|
site: this.dataForm.site, |
|
|
|
orderRef1: this.dataForm.orderNo, |
|
|
|
orderRef2: this.dataForm.orderItemNo, |
|
|
|
} |
|
|
|
searchCRollInfoDetail(inData).then(({data}) => { |
|
|
|
this.dataList3 = data.rows |
|
|
|
for (let i = 0; i < data.total; i++) { |
|
|
|
this.sum4 += this.dataList3[i].rollQty; |
|
|
|
} |
|
|
|
this.sum3 = data.total; |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
//供应商批号录入 |
|
|
|
getSaveModel() { |
|
|
|
this.saveData = {}; |
|
|
|
this.modelFlag2 = true; |
|
|
|
}, |
|
|
|
goSaveSuppRollNo() { |
|
|
|
if (this.saveData.site == '' || this.saveData.site == null) { |
|
|
|
this.$alert("请输入工厂编码!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (this.saveData.rollNo == '' || this.saveData.rollNo == null) { |
|
|
|
this.$alert("请输入卷号!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (this.saveData.suppRollNo == '' || this.saveData.suppRollNo == null) { |
|
|
|
this.$alert("请输入供应商批号!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
saveSuppRollNo(this.saveData).then(({data}) => { |
|
|
|
if (data.rows == null) { |
|
|
|
this.$alert("该卷号不存在,请输入!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
if (data.rows.suppRollNoFlag == 'Y') { |
|
|
|
this.$confirm(`该卷已经录入供应商批号,确认要重新录入吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
} |
|
|
|
}).then(() => { |
|
|
|
doSaveSuppRollNo(this.saveData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.modelFlag2 = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
doSaveSuppRollNo(this.saveData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.modelFlag2 = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style > |
|
|
|
<style> |
|
|
|
.el-textarea__inner { |
|
|
|
padding: 5px 5px; |
|
|
|
} |
|
|
|
|