Browse Source

🦄 refactor:去除加配字段

fix_bug_pro20231227
qb 1 year ago
parent
commit
44f4f442ef
  1. 61
      src/views/distribution/checkInventoryTask/createTask.vue
  2. 26
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue

61
src/views/distribution/checkInventoryTask/createTask.vue

@ -141,7 +141,11 @@
<!-- 表单按钮 --> <!-- 表单按钮 -->
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" <el-button
type="primary"
icon="el-icon-circle-check"
@click="handleSubmit"
:loading="buttonLoadingList.createTaskButton"
> </el-button > </el-button
> >
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button> <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
@ -327,6 +331,12 @@ export default {
// //
typeData: [], typeData: [],
//
buttonLoadingList: {
//
createTaskButton: false,
},
}; };
}, },
mounted() { mounted() {
@ -617,6 +627,9 @@ export default {
// //
async handleSubmit() { async handleSubmit() {
try {
this.buttonLoadingList.createTaskButton = true;
// //
if (!this.form.time || this.form.time.length === 0) { if (!this.form.time || this.form.time.length === 0) {
return this.$message({ return this.$message({
@ -629,9 +642,13 @@ export default {
formData.list = []; formData.list = [];
// //
console.log('this.form.selectList :>> ', this.form.selectList);
//
const _clientList = this.form.clientList || [];
//
if (this.form.selectList.length !== 0) { if (this.form.selectList.length !== 0) {
this.form.selectList.forEach(val => { this.form.selectList.forEach(val => {
if (this.form.clientList.includes(val.id)) if (_clientList.includes(val.id))
formData.list.push({ formData.list.push({
refId: val.id, refId: val.id,
refName: val.clientName, refName: val.clientName,
@ -656,6 +673,11 @@ export default {
this.onLoad(); this.onLoad();
// //
this.box = false; this.box = false;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.buttonLoadingList.createTaskButton = false;
}
}, },
/** /**
@ -698,41 +720,6 @@ export default {
}); });
}, },
/**
* 编辑单个任务
*/
async handleEditCheck(row) {
this.title = '编辑盘点任务';
this.isEdit = true; //
this.box = true; //
console.log('row :>> ', row);
this.form.brandName = row.brandName;
this.form.time = [row.startTime, row.endTime];
this.form.clientList = row.list.map(val => val.refId);
this.form.dictKey = row.questStatus;
this.form.selectList = [];
this.form.id = row.id;
console.log('this.form :>> ', this.form);
//
const res = await getDictList();
const { code, data } = res.data;
if (code === 200 && !!data) {
console.log('data :>> ', data);
this.form.selectList = data.map(item => {
return {
//
clientName: item.clientName,
// id
id: item.id,
//
brandName: item.brandName,
};
});
}
},
beforeClose(done) { beforeClose(done) {
done(); done();
this.form = {}; this.form = {};

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

@ -81,7 +81,7 @@
>转预约单</el-button >转预约单</el-button
> >
<el-button type="primary" icon="el-icon-edit" @click="handleStockList" v-if="handler" <el-button type="primary" icon="el-icon-edit" @click="handleStockList" v-if="handler"
>批量加配转库存品</el-button >批量转库存品</el-button
> >
<el-button <el-button
type="danger" type="danger"
@ -117,7 +117,9 @@
v-if="!handler" v-if="!handler"
>通知提货</el-button >通知提货</el-button
> >
<el-button type="danger" icon="el-icon-plus" @click="handleExport" plain> </el-button> <el-button type="danger" icon="el-icon-plus" @click="handleExport" plain
> </el-button
>
</div> </div>
<!-- 头部右侧按钮模块 --> <!-- 头部右侧按钮模块 -->
<div class="avue-crud__right"> <div class="avue-crud__right">
@ -392,7 +394,8 @@ import {
add, add,
update, update,
remove, remove,
addStock, stockArticExport addStock,
stockArticExport,
} from '@/api/distribution/distributionStockArticle'; } from '@/api/distribution/distributionStockArticle';
import { getListOwn } from '@/api/distribution/distributionParcelList'; import { getListOwn } from '@/api/distribution/distributionParcelList';
import { addCallDelivery } from '@/api/distribution/distrilbutionCallDelivery'; import { addCallDelivery } from '@/api/distribution/distrilbutionCallDelivery';
@ -1007,17 +1010,15 @@ export default {
methods: { methods: {
// //
handleExport() { handleExport() {
let row = { }; let row = {};
if(!!this.ids){ if (!!this.ids) {
row.ids = this.ids; row.ids = this.ids;
} }
row.typeService ="2"; row.typeService = '2';
stockArticExport(row).then( res =>{ stockArticExport(row).then(res => {
console.log(res.data); console.log(res.data);
downloadXls(res.data, '市配订单数据.xlsx'); downloadXls(res.data, '市配订单数据.xlsx');
}); });
}, },
showdrawer(value) { showdrawer(value) {
this.drawerShow = value; this.drawerShow = value;
@ -1173,8 +1174,8 @@ export default {
} }
if (item.isZero === '1') { if (item.isZero === '1') {
this.$message.warning(item.orderCode + ' - 为零担订单,暂无法转为库存品') this.$message.warning(item.orderCode + ' - 为零担订单,暂无法转为库存品');
return false return false;
} }
ids.push(item.id); ids.push(item.id);
@ -1494,9 +1495,6 @@ export default {
type: 'error', type: 'error',
message: '功能还在开发中', message: '功能还在开发中',
}); });
this.title = '新增';
this.form = {};
this.box = true;
}, },
handleEdit(row) { handleEdit(row) {
this.title = '编辑'; this.title = '编辑';

Loading…
Cancel
Save