Browse Source

🦄 refactor:去除加配字段

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

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

@ -141,7 +141,11 @@
<!-- 表单按钮 -->
<template #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 icon="el-icon-circle-close" @click="box = false"> </el-button>
@ -327,6 +331,12 @@ export default {
//
typeData: [],
//
buttonLoadingList: {
//
createTaskButton: false,
},
};
},
mounted() {
@ -617,45 +627,57 @@ export default {
//
async handleSubmit() {
//
if (!this.form.time || this.form.time.length === 0) {
return this.$message({
type: 'error',
message: '请选择盘点时间',
});
}
try {
this.buttonLoadingList.createTaskButton = true;
//
if (!this.form.time || this.form.time.length === 0) {
return this.$message({
type: 'error',
message: '请选择盘点时间',
});
}
const formData = {};
formData.list = [];
//
console.log('this.form.selectList :>> ', this.form.selectList);
//
const _clientList = this.form.clientList || [];
//
if (this.form.selectList.length !== 0) {
this.form.selectList.forEach(val => {
if (_clientList.includes(val.id))
formData.list.push({
refId: val.id,
refName: val.clientName,
});
});
}
//
formData.startTime = this.form.time[0].toLocaleString();
//
formData.endTime = this.form.time[1].toLocaleString();
console.log('formData :>> ', formData);
const formData = {};
formData.list = [];
const res = await postAddtaskQuest(formData);
const { code, msg } = res.data;
//
if (this.form.selectList.length !== 0) {
this.form.selectList.forEach(val => {
if (this.form.clientList.includes(val.id))
formData.list.push({
refId: val.id,
refName: val.clientName,
});
});
if (code === 200)
this.$message({
message: msg,
type: 'success',
});
//
this.onLoad();
//
this.box = false;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.buttonLoadingList.createTaskButton = false;
}
//
formData.startTime = this.form.time[0].toLocaleString();
//
formData.endTime = this.form.time[1].toLocaleString();
console.log('formData :>> ', formData);
const res = await postAddtaskQuest(formData);
const { code, msg } = res.data;
if (code === 200)
this.$message({
message: msg,
type: 'success',
});
//
this.onLoad();
//
this.box = 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) {
done();
this.form = {};

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

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

Loading…
Cancel
Save