|
@@ -120,17 +120,17 @@
|
|
|
})
|
|
|
},
|
|
|
cfm(){
|
|
|
-
|
|
|
let obj = {
|
|
|
userId: this.operateUser,
|
|
|
- plcCode: this.plcStationCode,
|
|
|
+ plcCode: this.plcStationCode * 1,
|
|
|
+ //rfidItems:['B00000000000000000030854'],
|
|
|
rfidItems: this.scanList.map(item => item.rfidCode),
|
|
|
stockChangeType: this.stockChangeType,
|
|
|
- remark: this.remark
|
|
|
+ remark: this.remark,
|
|
|
+ device:1,
|
|
|
}
|
|
|
console.log(obj)
|
|
|
|
|
|
-
|
|
|
if((this.roleKey == 'sewing' || this.roleKey == 'crop' || this.roleKey == '001')){
|
|
|
if(this.stockChangeType == 20){
|
|
|
this.materialReceiveSubmit(obj)
|
|
@@ -142,17 +142,36 @@
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- this.$http.HandleMacStockInOut(obj).then(res => {
|
|
|
- console.log(res)
|
|
|
- if(res.code === 0) {
|
|
|
+ uni.request({
|
|
|
+ url: 'http://120.79.80.64:8050' + '/cloudApi/stock/out',
|
|
|
+ method: 'POST',
|
|
|
+ header:{
|
|
|
+ 'Content-Type' : 'application/json',
|
|
|
+ },
|
|
|
+ data: obj,
|
|
|
+ success: res => {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code == 200){
|
|
|
+ this.$msg.showToast(res.msg || '操作成功!')
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.$utils.back()
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
|
|
|
- this.$msg.showToast(res.msg || '操作成功!')
|
|
|
- this.timer = setTimeout(() => {
|
|
|
- this.$utils.back()
|
|
|
- }, 2000)
|
|
|
+ },fail(err) {
|
|
|
+ console.log(err);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ // this.$http.HandleMacStockInOut(obj).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ // if(res.code === 0) {
|
|
|
+
|
|
|
+ // this.$msg.showToast(res.msg || '操作成功!')
|
|
|
+ // this.timer = setTimeout(() => {
|
|
|
+ // this.$utils.back()
|
|
|
+ // }, 2000)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
materialReceiveSubmit(obj){
|
|
|
console.log({
|