|
|
@@ -21,7 +21,7 @@
|
|
21
|
21
|
</el-col>
|
|
22
|
22
|
<el-col :span="12">
|
|
23
|
23
|
<el-form-item label="规格型号">
|
|
24
|
|
- <el-input v-model="form.attrib03" disabled />
|
|
|
24
|
+ <el-input v-model="form.attrib_03" disabled />
|
|
25
|
25
|
</el-form-item>
|
|
26
|
26
|
</el-col>
|
|
27
|
27
|
</el-row>
|
|
|
@@ -55,12 +55,12 @@
|
|
55
|
55
|
<el-row :gutter="20">
|
|
56
|
56
|
<el-col :span="12">
|
|
57
|
57
|
<el-form-item label="订单号">
|
|
58
|
|
- <el-input v-model="form.attrib01" />
|
|
|
58
|
+ <el-input v-model="form.attrib_01" />
|
|
59
|
59
|
</el-form-item>
|
|
60
|
60
|
</el-col>
|
|
61
|
61
|
<el-col :span="12">
|
|
62
|
62
|
<el-form-item label="合约号">
|
|
63
|
|
- <el-input v-model="form.attrib02" />
|
|
|
63
|
+ <el-input v-model="form.attrib_02" />
|
|
64
|
64
|
</el-form-item>
|
|
65
|
65
|
</el-col>
|
|
66
|
66
|
</el-row>
|
|
|
@@ -68,12 +68,12 @@
|
|
68
|
68
|
<el-row :gutter="20">
|
|
69
|
69
|
<el-col :span="12">
|
|
70
|
70
|
<el-form-item label="捆包号">
|
|
71
|
|
- <el-input v-model="form.attrib04" />
|
|
|
71
|
+ <el-input v-model="form.attrib_04" />
|
|
72
|
72
|
</el-form-item>
|
|
73
|
73
|
</el-col>
|
|
74
|
74
|
<el-col :span="12">
|
|
75
|
75
|
<el-form-item label="产地">
|
|
76
|
|
- <el-input v-model="form.attrib05" />
|
|
|
76
|
+ <el-input v-model="form.attrib_05" />
|
|
77
|
77
|
</el-form-item>
|
|
78
|
78
|
</el-col>
|
|
79
|
79
|
</el-row>
|
|
|
@@ -127,7 +127,7 @@
|
|
127
|
127
|
<el-row :gutter="20">
|
|
128
|
128
|
<el-col :span="24">
|
|
129
|
129
|
<el-form-item label="备注">
|
|
130
|
|
- <el-input v-model="form.remark1" type="textarea" :rows="2" />
|
|
|
130
|
+ <el-input v-model="form.remark_1" type="textarea" :rows="2" />
|
|
131
|
131
|
</el-form-item>
|
|
132
|
132
|
</el-col>
|
|
133
|
133
|
</el-row>
|
|
|
@@ -155,20 +155,20 @@ const ownerCompanyOptions = ref([])
|
|
155
|
155
|
const createEmptyForm = () => ({
|
|
156
|
156
|
id: '',
|
|
157
|
157
|
materialNo: '',
|
|
158
|
|
- attrib03: '',
|
|
|
158
|
+ attrib_03: '',
|
|
159
|
159
|
materialName: '',
|
|
160
|
160
|
stGrade: '',
|
|
161
|
161
|
quantity: '',
|
|
162
|
162
|
weight: '',
|
|
163
|
|
- attrib01: '',
|
|
164
|
|
- attrib02: '',
|
|
165
|
|
- attrib04: '',
|
|
166
|
|
- attrib05: '',
|
|
|
163
|
+ attrib_01: '',
|
|
|
164
|
+ attrib_02: '',
|
|
|
165
|
+ attrib_04: '',
|
|
|
166
|
+ attrib_05: '',
|
|
167
|
167
|
prodPlace: '',
|
|
168
|
168
|
ownerCompany: '',
|
|
169
|
169
|
customerCompany: '',
|
|
170
|
170
|
deliveryAddress: '',
|
|
171
|
|
- remark1: ''
|
|
|
171
|
+ remark_1: ''
|
|
172
|
172
|
})
|
|
173
|
173
|
|
|
174
|
174
|
const form = reactive(createEmptyForm())
|
|
|
@@ -216,20 +216,20 @@ const open = (row) => {
|
|
216
|
216
|
Object.assign(form, createEmptyForm(), {
|
|
217
|
217
|
id: row.storeId ?? '',
|
|
218
|
218
|
prodNo: row.prodNo ?? '',
|
|
219
|
|
- attrib03: row.attrib03 ?? '',
|
|
|
219
|
+ attrib_03: row.attrib_03 ?? '',
|
|
220
|
220
|
materialName: row.materialName ?? '',
|
|
221
|
221
|
stGrade: row.ST_GRADE ?? row.stGrade ?? '',
|
|
222
|
222
|
quantity: row.quantity ?? row.QUANTITY ?? '',
|
|
223
|
223
|
weight: row.weight ?? row.WEIGHT ?? '',
|
|
224
|
|
- attrib01: row.attrib01 ?? '',
|
|
225
|
|
- attrib02: row.attrib02 ?? '',
|
|
226
|
|
- attrib04: row.attrib04 ?? '',
|
|
227
|
|
- attrib05: row.attrib05 ?? '',
|
|
|
224
|
+ attrib_01: row.attrib_01 ?? '',
|
|
|
225
|
+ attrib_02: row.attrib_02 ?? '',
|
|
|
226
|
+ attrib_04: row.attrib_04 ?? '',
|
|
|
227
|
+ attrib_05: row.attrib_05 ?? '',
|
|
228
|
228
|
prodPlace: row.prodPlace ?? '',
|
|
229
|
229
|
ownerCompany: row.ownerCompany ?? '',
|
|
230
|
230
|
customerCompany: row.customerCompany ?? row.CustomerCompany ?? '',
|
|
231
|
231
|
deliveryAddress: row.deliveryAddress ?? '',
|
|
232
|
|
- remark1: row.remark1 ?? ''
|
|
|
232
|
+ remark_1: row.remark_1 ?? ''
|
|
233
|
233
|
})
|
|
234
|
234
|
|
|
235
|
235
|
// 获取选项数据
|
|
|
@@ -248,23 +248,19 @@ const handleClose = () => {
|
|
248
|
248
|
// 确定
|
|
249
|
249
|
const handleConfirm = async () => {
|
|
250
|
250
|
try {
|
|
251
|
|
- // 构建保存参数,使用 id 而不是 storeId
|
|
|
251
|
+ // 构建保存参数,使用 id 作为后端主键
|
|
252
|
252
|
const { storeId, ...saveData } = form
|
|
253
|
|
-
|
|
254
|
|
- // 确保使用 id 字段进行保存
|
|
|
253
|
+
|
|
255
|
254
|
if (!saveData.id) {
|
|
256
|
255
|
ElMessage.warning('缺少必要的数据ID')
|
|
257
|
256
|
return
|
|
258
|
257
|
}
|
|
259
|
|
-
|
|
260
|
|
- // TODO: 根据实际API调整接口地址和参数格式
|
|
261
|
|
- const url = 'sto/OutRecord/update' // 需要根据实际API调整
|
|
262
|
|
- const param = {
|
|
263
|
|
- json: JSON.stringify(saveData)
|
|
264
|
|
- }
|
|
265
|
|
-
|
|
266
|
|
- const response = await proxy.$axios.post(url, param)
|
|
267
|
|
-
|
|
|
258
|
+
|
|
|
259
|
+ const url = 'sto/ProdMaster/edit'
|
|
|
260
|
+
|
|
|
261
|
+ // axios 封装第三个参数是 contentType 字符串,否则会被当作对象导致 Content-Type:[object Object]
|
|
|
262
|
+ const response = await proxy.$axios.post(url, saveData, 'application/json')
|
|
|
263
|
+
|
|
268
|
264
|
if (response.data.code === 0 || response.data.code === '0') {
|
|
269
|
265
|
ElMessage.success('修改成功')
|
|
270
|
266
|
handleClose()
|