|
|
@@ -19,13 +19,13 @@
|
|
|
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="退料单名称" prop="name" label-width="90px">
|
|
|
- <el-input v-model="returnForm.name"></el-input>
|
|
|
+ <el-input v-model="returnForm.name" :disabled="returnDetailsId"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="退料场景" prop="scene" label-width="90px">
|
|
|
- <el-select v-model="returnForm.scene" placeholder="请选择">
|
|
|
+ <el-select v-model="returnForm.scene" :disabled="returnDetailsId" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in sceneList"
|
|
|
:key="item.value"
|
|
|
@@ -41,12 +41,12 @@
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="20">
|
|
|
<el-form-item label="退料描述" prop="remark" label-width="90px">
|
|
|
- <el-input v-model="returnForm.remark"></el-input>
|
|
|
+ <el-input v-model="returnForm.remark" :disabled="returnDetailsId"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
- <el-button type="primary" @click="selectOrder"
|
|
|
+ <el-button type="primary" @click="selectOrder" v-if="!returnDetailsId"
|
|
|
>选择领料单</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
@@ -128,7 +128,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="操作" fixed="right" width="100px">
|
|
|
+ <el-table-column label="操作" fixed="right" width="100px" v-if="!returnDetailsId">
|
|
|
<template slot-scope="{ $index, row }">
|
|
|
<el-link type="danger" @click="removeItem(idx, $index)"
|
|
|
>删除</el-link
|
|
|
@@ -155,7 +155,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { getCode } from '@/api/produce/workOrder';
|
|
|
- import { refundable, save } from '@/api/materialReturn/index.js';
|
|
|
+ import { refundable, save, getById } from '@/api/materialReturn/index.js';
|
|
|
import pickList from './pickList.vue';
|
|
|
|
|
|
import { typeName } from '@/views/produce/components/common.js';
|
|
|
@@ -167,6 +167,10 @@
|
|
|
default() {
|
|
|
return [];
|
|
|
}
|
|
|
+ },
|
|
|
+ returnDetailsId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -196,7 +200,12 @@
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- this.getOrderCode();
|
|
|
+
|
|
|
+ if(this.returnDetailsId) {
|
|
|
+ this.getDetails()
|
|
|
+ } else {
|
|
|
+ this.getOrderCode();
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
@@ -248,7 +257,22 @@
|
|
|
save(parma).then((res) => {
|
|
|
this.$emit('close', true);
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ getDetails() {
|
|
|
+ getById(this.returnDetailsId).then((res) => {
|
|
|
+ console.log(res, 99);
|
|
|
+ this.returnForm.code = res.code
|
|
|
+ this.returnForm.name = res.name
|
|
|
+ this.returnForm.remark = res.remark
|
|
|
+ this.returnForm.scene = res.scene
|
|
|
+ this.returnList = res.pickOrderList
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|