Browse Source

在库订单转库存品只有一个订单时转详情页

fix_bug_pro20231227
qb 1 year ago
parent
commit
1a247a16f9
  1. 6
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  2. 14
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue
  3. 13
      src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue
  4. 13
      src/views/distribution/inventory/delivery/distributionStockArticleWhole.vue
  5. 73
      src/views/distribution/inventory/distributionStockArticleFrom.vue

6
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -1266,6 +1266,11 @@ export default {
this.$message.warning(item.orderCode + ' - 未齐套,无法转为库存品!!!');
return false;
}
console.log('item :>> ', item);
if (item.isZero === '1') {
this.$message.warning(item.orderCode + ' - 为零担订单,暂无法转为库存品')
return false
}
console.log('111 :>> ', 111);
ids.push(item.id);
return true;
@ -1282,6 +1287,7 @@ export default {
});
// console.log("",res.data.data.records);
lost = res.data.data.records.every(val => {
console.log('val.materialId :>> ', val.materialId);
if (!val.materialId) return false;
return true;
});

14
src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue

@ -1145,6 +1145,12 @@ export default {
this.$message.warning(item.orderCode + ' - 为冻结单,无法转为库存品!!!');
return false;
}
if (item.isZero === '1') {
this.$message.warning(item.orderCode + ' - 为零担订单,暂无法转为库存品')
return false
}
ids.push(item.id);
return true;
});
@ -1170,6 +1176,14 @@ export default {
'订单信息不完整,请完善包件信息!如没有请维护物料信息,在选择!!!'
);
}
if (this.selectionList.length === 1) {
console.log('111>>>>>>>>>>>>>>', this.selectionList[0]);
return this.$router.push(
'/distribution/inventory/distributionStockArticleFrom?id=' + this.selectionList[0].id
);
}
this.getSock();
},
getSock() {

13
src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue

@ -1382,6 +1382,11 @@ export default {
return false;
}
if (item.isZero === '1') {
this.$message.warning(item.orderCode + ' - 为零担订单,暂无法转为库存品')
return false
}
ids.push(item.id);
return true;
});
@ -1406,6 +1411,14 @@ export default {
'订单信息不完整,请完善包件信息!如没有请维护物料信息,在选择!!!'
);
}
if (this.selectionList.length === 1) {
console.log('111>>>>>>>>>>>>>>', this.selectionList[0]);
return this.$router.push(
'/distribution/inventory/distributionStockArticleFrom?id=' + this.selectionList[0].id
);
}
this.getSock();
},
getSock() {

13
src/views/distribution/inventory/delivery/distributionStockArticleWhole.vue

@ -1139,6 +1139,11 @@ export default {
this.$message.warning(item.orderCode + ' - 为冻结单,无法转为库存品!!!');
return false;
}
console.log('item :>> ', item);
if (item.isZero === '1') {
this.$message.warning(item.orderCode + ' - 为零担订单,暂无法转为库存品')
return false
}
ids.push(item.id);
return true;
});
@ -1164,6 +1169,14 @@ export default {
'订单信息不完整,请完善包件信息!如没有请维护物料信息,在选择!!!'
);
}
if (this.selectionList.length === 1) {
console.log('111>>>>>>>>>>>>>>', this.selectionList[0]);
return this.$router.push(
'/distribution/inventory/distributionStockArticleFrom?id=' + this.selectionList[0].id
);
}
this.getSock();
},
getSock(){

73
src/views/distribution/inventory/distributionStockArticleFrom.vue

@ -38,22 +38,37 @@
>
</el-table-column>
</template>
<el-table-column prop="menu" label="转库存品数量" :width="220" align="center">
<!-- <el-table-column prop="menu" label="转库存品数量" :width="220" align="center">
<template #="{ row }">
<!-- <el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>-->
<!-- <el-input v-model="row.inventoryQuantity" @blur="handleNumberRange($event,row)" :disabled= !this.ids.includes(row.id) ></el-input>-->
<el-input v-model="row.quantity" disabled></el-input>
</template>
</el-table-column>
</el-table-column> -->
<!-- 操作栏模块 -->
<!-- <el-table-column prop="menu" label="操作" :width="220" align="center">-->
<!-- <template #="{row}">-->
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!-- <tablecmt
:columnList="columnList"
:tableData="data"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope)"
>查看</el-text
>
<el-text
type="primary"
text
icon="el-icon-edit"
@click="handleCallDeliveryOwn(slotProps.scope)"
>修改客户信息</el-text
>
</template>
</tablecmt> -->
</el-row>
<el-row>
<div class="avue-crud__pagination" style="width: 100%">
@ -114,9 +129,19 @@ export default {
data: [],
};
},
mounted() {
this.init();
this.onLoad(this.page);
watch: {
//
$route:{
handler(to, form){
console.log('to :>> ', to);
console.log('form :>> ', form);
this.init();
this.onLoad(this.page);
},
deep: true,
immediate: true
}
},
computed: {
...mapGetters(['permission']),
@ -130,9 +155,24 @@ export default {
},
methods: {
async handleTrade() {
if (this.ids.length > 0) {
let a = await addStockRow({ids: this.ids});
console.log('>>>>===', a.data);
console.log(this.$route)
let res = await addStockRow({ids: this.ids});
const {code, msg} = res.data
if(code === 200){
this.$message({
type: 'success',
message: msg
})
//
this.$router.go (-1)
//
this.contextmenuFlag = false;
this.$store.commit('DEL_TAG_CURRENT');
}
// console.log('>>>>===', a.data);
// if (a.data.success) {
// this.onLoad(this.page);
// }
@ -272,6 +312,7 @@ export default {
this.onLoad(this.page);
},
onLoad(page, params = {}) {
console.log('1111 :>> ', 1111);
this.loading = true;
this.query.stockArticleId = this.$route.query.id;
this.query.conditions = '1';

Loading…
Cancel
Save