|
@@ -119,6 +119,18 @@
|
119
|
119
|
{{scope.row.stock_count}}
|
120
|
120
|
</template>
|
121
|
121
|
</el-table-column>
|
|
122
|
+ <el-table-column prop="name" label="盘点原因" width="180" align="center">
|
|
123
|
+ <template slot-scope="scope">
|
|
124
|
+ <el-select v-model="scope.row.type" placeholder="请选择">
|
|
125
|
+ <el-option
|
|
126
|
+ v-for="item in reasonList"
|
|
127
|
+ :key="item.id"
|
|
128
|
+ :label="item.name"
|
|
129
|
+ :value="item.id">
|
|
130
|
+ </el-option>
|
|
131
|
+ </el-select>
|
|
132
|
+ </template>
|
|
133
|
+ </el-table-column>
|
122
|
134
|
<el-table-column label="盘点后数量" align="center">
|
123
|
135
|
<template slot-scope="scope">
|
124
|
136
|
<el-input style="width:80px" v-model="scope.row.last_stock_count" type="number"></el-input>
|
|
@@ -197,7 +209,16 @@
|
197
|
209
|
goodList:[],
|
198
|
210
|
manufacturerList:[],
|
199
|
211
|
user_name:this.$store.getters.xt_user.user.user_name,
|
200
|
|
- infoList:[]
|
|
212
|
+ infoList:[],
|
|
213
|
+ reasonList:[
|
|
214
|
+ {id:6,name:"默认"},
|
|
215
|
+ {id:1,name:"到期退货"},
|
|
216
|
+ {id:2,name:"异常退货"},
|
|
217
|
+ {id:3,name:"退货"},
|
|
218
|
+ {id:4,name:"损坏"},
|
|
219
|
+ {id:5,name:"不计入报损分析"},
|
|
220
|
+ {id:7,name:"有效期到期"},
|
|
221
|
+ ],
|
201
|
222
|
};
|
202
|
223
|
},
|
203
|
224
|
watch: {},
|
|
@@ -245,13 +266,27 @@
|
245
|
266
|
handleCurrentChange(val){
|
246
|
267
|
getGoodInventoryByGoodId(val.id).then(response=>{
|
247
|
268
|
if(response.data.state ==1){
|
248
|
|
- var obj = {}
|
249
|
|
- this.infoList = response.data.data.infoList
|
|
269
|
+
|
|
270
|
+ this.infoList = []
|
|
271
|
+ var infoList = response.data.data.infoList
|
|
272
|
+ for(let i=0;i<infoList.length;i++){
|
|
273
|
+ infoList[i].type = 6
|
|
274
|
+ infoList[i].last_stock_count = infoList[i].stock_count
|
|
275
|
+ this.infoList.push(infoList[i])
|
|
276
|
+ }
|
|
277
|
+
|
|
278
|
+ console.log("infoList====================",this.infoList)
|
|
279
|
+
|
|
280
|
+
|
250
|
281
|
}
|
251
|
282
|
})
|
252
|
283
|
},
|
253
|
284
|
UpdateWarehouseInfo(row){
|
254
|
|
- if(parseInt(row.last_stock_count) >=parseInt(row.stock_count)){
|
|
285
|
+ if(parseInt(row.last_stock_count)<0){
|
|
286
|
+ this.$message.error("盘点后数量不能为负数!")
|
|
287
|
+ return false
|
|
288
|
+ }
|
|
289
|
+ if(parseInt(row.last_stock_count) >=parseInt(row.warehousing_count)){
|
255
|
290
|
this.$message.error("该批次盘点后数量不能大于或等于入库数量!")
|
256
|
291
|
return false
|
257
|
292
|
}
|
|
@@ -260,12 +295,16 @@
|
260
|
295
|
stock_count:parseInt(row.stock_count),
|
261
|
296
|
last_stock_count:parseInt(row.last_stock_count),
|
262
|
297
|
good_id:row.good_id,
|
263
|
|
- storehouse_id:parseInt(val.storehouse_id),
|
|
298
|
+ storehouse_id:parseInt(row.storehouse_id),
|
|
299
|
+ is_type:parseInt(row.type)
|
264
|
300
|
}
|
|
301
|
+ console.log("params22222222222222",params)
|
265
|
302
|
updateInventoryWarehouseInfo(params).then(response=>{
|
266
|
303
|
if(response.data.state ==1){
|
267
|
304
|
var msg = response.data.data.msg
|
268
|
305
|
this.$message.success("保存成功!")
|
|
306
|
+ row.id =row.good_id
|
|
307
|
+ this.handleCurrentChange(row)
|
269
|
308
|
}
|
270
|
309
|
})
|
271
|
310
|
}
|