Commit 001f239c authored by 沈翠玲's avatar 沈翠玲

领料申请联动

parent ab1619d8
......@@ -82,17 +82,9 @@
watch: {
arrangeCode(v){
if(v) {
this.queryParams.arrangeCode = v;
this.getList();
this.queryParams.arrangeCode = v;
this.getList();
}
},
workorderCode (v) {
console.log('workorderCode', v)
if(v) {
this.queryParams.workorderCode = v;
this.getList();
}
}
},
data() {
......
......@@ -104,11 +104,8 @@
components: {},
dicts: ['mes_order_status','mes_workorder_sourcetype'],
props:{
workorder: {
type: Object,
default: function(){
return {}
}} //外部传入的工单过滤信息
arrangeCode: undefined,
workorderCode: undefined
},
watch: {
arrangeCode(v){
......@@ -116,7 +113,13 @@
this.queryParams.arrangeCode = v;
this.getList();
}
}
},
workorderCode(v){
if(v){
this.queryParams.workorderCode = v;
this.getList();
}
}
},
data() {
return {
......@@ -144,28 +147,28 @@
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: null,
workorderName: null,
workorderType: this.workorder.workorderType,
orderSource: null,
sourceCode: null,
productId: null,
productCode: null,
productName: null,
productSpc: null,
unitOfMeasure: null,
quantity: null,
arrangeCode: null,
quantityProduced: null,
quantityChanged: null,
quantityScheduled: null,
clientId: null,
clientCode: null,
clientName: null,
requestDate: null,
parentId: null,
ancestors: null,
status: null,
workorderCode: this.workorderCode,
workorderName: null,
workorderType: null,
orderSource: null,
sourceCode: null,
productId: null,
productCode: null,
productName: null,
productSpc: null,
unitOfMeasure: null,
quantity: null,
arrangeCode: this.arrangeCode,
quantityProduced: null,
quantityChanged: null,
quantityScheduled: null,
clientId: null,
clientCode: null,
clientName: null,
requestDate: null,
parentId: null,
ancestors: null,
status: null,
},
}
......@@ -189,7 +192,32 @@
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
workorderCode: null,
workorderName: null,
workorderType: null,
orderSource: null,
sourceCode: null,
productId: null,
productCode: null,
productName: null,
productSpc: null,
unitOfMeasure: null,
quantity: null,
arrangeCode: null,
quantityProduced: null,
quantityChanged: null,
quantityScheduled: null,
clientId: null,
clientCode: null,
clientName: null,
requestDate: null,
parentId: null,
ancestors: null,
status: null,
}
this.handleQuery();
},
handleCurrent(row){
......
......@@ -149,8 +149,6 @@
</el-input>
</el-form-item>
</el-col>
<BrandSelect ref="brSelect" :arrangeCode="form.arrangeCode" @onSelected="onBrandSelected"></BrandSelect>
<arangeSelect ref="arangeSelect" :arrangeCode="form.arrangeCode" @onSelected="onBrandSelected"></arangeSelect>
<el-col :span="8">
<el-form-item label="编排单号" prop="arrangeCode">
<el-input v-model="form.arrangeCode" placeholder="请输入编排单号" >
......@@ -268,9 +266,9 @@
</el-col>
</el-row>
<BrandSelect ref="brSelect" :arrangeCode="form.arrangeCode" @onSelected="onBrandSelected"></BrandSelect>
<arangeSelect ref="arangeSelect" :arrangeCode="form.arrangeCode" :workorderCode="form.workorderCode" @onSelected="onBrandSelected"></arangeSelect>
<workorderSelect ref="workorderselect" :arrangeCode="form.arrangeCode" @onSelected="onWorkorderSelected"></workorderSelect>
<BrandSelect ref="brSelect" :arrangeCode="form.arrangeCode" @onSelected="(row)=>onSelected(row, 'BrandSelect')"></BrandSelect>
<arangeSelect ref="arangeSelect" key="arangeSelect" :arrangeCode="form.arrangeCode" @onSelected="(row)=>onSelected(row, 'arangeSelect')"></arangeSelect>
<workorderSelect ref="workorderselect" key="workorderselect" :arrangeCode="form.arrangeCode" :workorderCode="form.workorderCode" @onSelected="(row)=>onSelected(row, 'workorderSelect')"></workorderSelect>
<el-row>
<el-col :span="12">
<el-form-item label="申请时间" prop="createTime">
......@@ -386,20 +384,26 @@ export default {
handleBrandSelect() {
this.$refs.brSelect.showFlag = true;
},
onBrandSelected(row) {
onSelected(row, type) {
console.log(row, type)
if (row != undefined && row != null) {
this.form.taskId = row.taskId;
this.form.taskCode = row.taskCode;
this.form.arrangeCode = row.arrangeCode;
this.form.taskName = row.taskName;
}
},
onWorkorderSelected(row) {
if (row != undefined && row != null) {
this.form.workorderCode = row.workorderCode
if (type === 'workorderSelect') {
this.form.workorderCode = row.workorderCode
} else if (type === 'BrandSelect') {
this.form.taskId = row.taskId;
this.form.taskCode = row.taskCode;
this.form.arrangeCode = row.arrangeCode;
this.form.workorderCode = ''
this.form.taskName = row.taskName;
} else if (type === 'arangeSelect') {
this.form.taskCode = ''
this.form.taskId = ''
this.form.arrangeCode = row.arrangeCode;
this.form.taskName = '';
this.form.workorderCode = ''
}
}
},
},
handleItemSelect() {
this.$refs.ItemSelect.showFlag = true;
......
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 to comment