Browse Source

市配新增预约新增查询

dev-xx
qb 1 year ago
parent
commit
b8fc777345
  1. 206
      src/views/distribution/inventory/distrilbutionBillLading.vue
  2. 193
      src/views/distribution/reservation/reservationAddFrom.vue

206
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -345,43 +345,40 @@
<!-- 添加库存品 -->
<el-dialog v-model="dialogFormVisible" title="添加库存品" style="width: 80%">
<tablecmt
:columnList="option.columnStock"
:tableData="dataOwn"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-button @click="view(slotProps.scope)">查看</el-button>
</div>
</template>
:columnList="option.columnStock"
:tableData="dataOwn"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-button @click="view(slotProps.scope)">查看</el-button>
</div>
</template>
<template v-if="slotProps.scope.column.label === '添加数量'">
<!-- <el-input
<template v-if="slotProps.scope.column.label === '添加数量'">
<!-- <el-input
v-model="slotProps.scope.row.inventoryQuantity"
@blur="handleNumberRange($event, slotProps)"
></el-input> -->
<el-input-number
v-model="slotProps.scope.row.inventoryQuantity"
:precision="0"
:min="0"
:max="slotProps.scope.row.available"
:step="1"
@blur="handleNumberRange($event, slotProps)"
/>
</template>
v-model="slotProps.scope.row.inventoryQuantity"
:precision="0"
:min="0"
:max="slotProps.scope.row.available"
:step="1"
@blur="handleNumberRange($event, slotProps)"
/>
</template>
</tablecmt>
</template>
</tablecmt>
<!-- <el-table
<!-- <el-table
ref="table"
v-loading="loading"
@selection-change="selectionChangeStock"
@ -638,7 +635,7 @@ const $store = useStore();
export default {
data() {
return {
tabletit:'',//
tabletit: '', //
dialogImg: false,
Imgurl: undefined,
Selfpickuploading: false, //
@ -1826,7 +1823,7 @@ export default {
// loading
orderChooseLoading: false,
query: {},
packquery:{},
packquery: {},
//
currentPage: 1,
//
@ -1988,10 +1985,10 @@ export default {
},
methods: {
// tab
handleChlickTab(val){
this.tabletit = val.props.label
console.log(this.tabletit,'当前点击的标题栏');
this.query={};//
handleChlickTab(val) {
this.tabletit = val.props.label;
console.log(this.tabletit, '当前点击的标题栏');
this.query = {}; //
},
showdrawer(value) {
this.drawerShow = value;
@ -2062,9 +2059,9 @@ export default {
inputsc(index, row) {
this.query[row.prop] = index;
this.pageOrder.currentPage = 1;
if(this.tabletit=='库存品'){
this.onLoadList(this.query)
}else{
if (this.tabletit == '库存品') {
this.onLoadList(this.query);
} else {
this.onLoadOrder(this.pageOrder, this.query);
}
},
@ -2310,14 +2307,14 @@ export default {
...this.order.query,
}).then(res => {
console.log('res :>> ', res);
console.log(res.data.data.records,'获取到的包件');
console.log(res.data.data.records, '获取到的包件');
const data = res.data.data;
this.order.total = data.total;
this.order.orderDetails = data.records;
this.order.orderChooseLoading = false;
this.order.selectList = [];
this.order.selectList =res.data.data.records;//
this.order.selectList = res.data.data.records; //
this.selectionClear();
});
return null;
@ -2378,12 +2375,12 @@ export default {
},
//
handleNumberRange(e, row) {
console.log(e,'ee=====');
console.log(row,'row====');
if( row.scope.row.inventoryQuantity > row.scope.row.available){
this.$message.error('数量不能大于可用数量');
row.scope.row.inventoryQuantity=0
return;
console.log(e, 'ee=====');
console.log(row, 'row====');
if (row.scope.row.inventoryQuantity > row.scope.row.available) {
this.$message.error('数量不能大于可用数量');
row.scope.row.inventoryQuantity = 0;
return;
}
// if (e.target.value) {
// e.target.value = e.target.value.replace(/[^\.\d]/g, ''); //
@ -2533,7 +2530,6 @@ export default {
},
//
async handleSubmit() {
const zeroOrderList = this.dataList.filter(val => val.isZero === '1');
if (this.$route.query.type !== '2') {
//
@ -2557,11 +2553,11 @@ export default {
message: '有零担物料未填写',
});
}
// if ()
}
this.$refs.form.validate(async valid => {
if (valid) {
if (!this.form.id) {
// if (this.fileListSell.length === 0) {
// this.$message.warning('');
// return;
@ -2571,6 +2567,23 @@ export default {
this.bianLier(this.costListName, this.clientType, this.costList, fei);
console.log('321 :>> ', 321);
this.form.fei = Object.fromEntries(fei);
//
if (Object.keys(this.form.fei).length === 0) {
return this.$message.warning('请选择并填写费用信息!!!');
} else {
// if ()
let _flag = false;
for (const iterator of this.form.freightMark) {
if (!this.form.fei[iterator]) {
console.log('iterator :>> ', iterator);
_flag = true;
break;
}
}
if (_flag) return this.$message.warning('请填写正确的费用信息!!!');
}
this.form.stockArticleId = !this.$route.query.id ? null : this.$route.query.id; //ID
this.form.stockDTOList = this.data;
let o = [];
@ -2642,29 +2655,49 @@ export default {
});
submitFormData.billPackageEntityList = _billPackageEntityList;
this.Selfpickuploading = true; //
add(submitFormData).then((res) => {
this.Selfpickuploading = false; //
this.box = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
add(submitFormData)
.then(res => {
this.Selfpickuploading = false; //
this.box = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
this.contextmenuFlag = false;
this.Selfpickuploading = false; //
console.log(this.Selfpickuploading, '当前状态');
this.$store.commit('DEL_TAG_CURRENT');
this.$router.push('/distribution/inventory/distrilbutionBillLadingList');
})
.catch(res => {
this.Selfpickuploading = false; //
});
this.contextmenuFlag = false;
this.Selfpickuploading = false; //
console.log(this.Selfpickuploading, '当前状态');
this.$store.commit('DEL_TAG_CURRENT');
this.$router.push('/distribution/inventory/distrilbutionBillLadingList');
}).catch(res=>{
this.Selfpickuploading = false; //
});
} else {
console.log('111 :>> ', 111);
// return
let fei = new Map();
this.bianLier(this.costListName, this.clientType, this.costList, fei);
this.form.fei = Object.fromEntries(fei);
console.log('this.form.fei :>> ', this.form.fei);
//
if (Object.keys(this.form.fei).length === 0) {
return this.$message.warning('请选择并填写费用信息!!!');
} else {
// if ()
let _flag = false;
for (const iterator of this.form.freightMark) {
if (!this.form.fei[iterator]) {
console.log('iterator :>> ', iterator);
_flag = true;
break;
}
}
if (_flag) return this.$message.warning('请填写正确的费用信息!!!');
}
this.form.stockDTOList = this.data;
let o = [];
const fileListMapping = {
@ -2752,19 +2785,20 @@ export default {
up.billPackageEntityList = _billPackageEntityList;
up.unBillPackageEntityList = _unBillPackageEntityList;
this.Selfpickuploading = true; //
update(up).then(() => {
this.Selfpickuploading =false; //
this.$message({
type: 'success',
message: '操作成功!',
update(up)
.then(() => {
this.Selfpickuploading = false; //
this.$message({
type: 'success',
message: '操作成功!',
});
this.Selfpickuploading = false; //
this.$store.commit('DEL_TAG_CURRENT');
this.$router.push('/distribution/inventory/distrilbutionBillLadingList');
})
.catch(res => {
this.Selfpickuploading = false; //
});
this.Selfpickuploading = false; //
this.$store.commit('DEL_TAG_CURRENT');
this.$router.push('/distribution/inventory/distrilbutionBillLadingList');
}).catch(res=>{
this.Selfpickuploading = false; //
});
return;
}
}
@ -2993,14 +3027,14 @@ export default {
if (!!a.mallId) {
// params.marketId = a.mallId;
// params.warehouseId = a.warehouseId;
let data={
current:this.pageStock.currentPage,
size:this.pageStock.pageSize,
marketId:a.mallId,
warehouseId:a.warehouseId,
...dataso
}
console.log(data,'处理好的值');
let data = {
current: this.pageStock.currentPage,
size: this.pageStock.pageSize,
marketId: a.mallId,
warehouseId: a.warehouseId,
...dataso,
};
console.log(data, '处理好的值');
// return
getListStockList(data).then(res => {
const dataOwn = res.data.data;

193
src/views/distribution/reservation/reservationAddFrom.vue

@ -130,9 +130,9 @@
<tablecmt
class="tablesc"
:columnList="columnList"
:tableData="orderData"
:tableData="renderOrderData"
:loading="loading"
@inputTxt="inputsc"
@inputTxt="(value, row) => handleSearchOrder(value, row, 1)"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@ -179,9 +179,9 @@
<tablecmt
class="tablesc"
:columnList="stockcolumnList"
:tableData="inventoryData"
:tableData="renderInventoryData"
:loading="loading"
@inputTxt="inputsc"
@inputTxt="(value, row) => handleSearchStock(value, row, 1)"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@ -221,6 +221,7 @@
<!-- 底部站位 -->
<div class="footer-container"></div>
<!-- 在库订单信息 -->
<template v-if="orderShow">
<el-dialog
@ -230,39 +231,6 @@
width="100%"
:model="addvalue"
>
<!-- :before-close="handleClose"-->
<!-- <el-form :inline="true" :model="query">-->
<!-- <el-form-item label="订单自编号:">-->
<!-- <el-input v-model="query.orderCode" placeholder="请输入订单自编号"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="商场名称:">-->
<!-- <el-input-->
<!-- v-model="query.mallName"-->
<!-- :disabled="Boolean(marketName)"-->
<!-- placeholder="请输入商场名称"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="货物名称:">-->
<!-- <el-input v-model="query.descriptionGoods" placeholder="请输入货物名称"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="品牌:">-->
<!-- <el-input v-model="query.brand" placeholder="请输入品牌"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="顾客姓名:">-->
<!-- <el-input v-model="query.customerName" placeholder="请输入顾客姓名"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="顾客电话:">-->
<!-- <el-input v-model="query.customerTelephone" placeholder="请输入顾客电话"></el-input>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; 查询按钮 &ndash;&gt;-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="searchStockArticle"-->
<!-- > -->
<!-- </el-button>-->
<!-- <el-button icon="el-icon-delete" @click="stockArticleSearchReset()"> </el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<tablecmt
:columnList="stockArtcolumnList"
:tableData="stockArticleInfo"
@ -311,6 +279,7 @@
</el-dialog>
</template>
<!-- 零担品类信息 -->
<el-dialog v-model="zeroOrderShow" title="零担品类信息" width="50%" :model="zeroOrderData">
<el-row :gutter="24" class="rows">
<el-col :xl="4" :lg="7" :md="8" :sm="24">
@ -383,35 +352,6 @@
<template v-if="stockListShow">
<el-dialog v-model="stockListShow" class="stockListShow" title="库存品信息" width="90%">
<div v-loading="Inventoryloading" element-loading-text="正在拼命加载中...">
<!-- :before-close="handleClose"-->
<!-- <el-form :inline="true" :model="query">-->
<!-- <el-form-item label="商场名称:">-->
<!-- <el-input-->
<!-- v-model="query.marketName"-->
<!-- :disabled="Boolean(marketName)"-->
<!-- placeholder="请输入商场名称"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="物料名称:">-->
<!-- <el-input v-model="query.descriptionGoods" placeholder="请输入物料名称"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="商场编码:">-->
<!-- <el-input v-model="query.marketCode" placeholder="请输入商场编码"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="订单自编号:">-->
<!-- <el-input v-model="query.orderCode" placeholder="请输入订单自编号"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="品牌:">-->
<!-- <el-input v-model="query.brand" placeholder="请输入品牌"></el-input>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; 查询按钮 &ndash;&gt;-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="handleAddInventory"-->
<!-- > -->
<!-- </el-button>-->
<!-- <el-button icon="el-icon-delete" @click="stockListSearchReset()"> </el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<tablecmt
:columnList="inventoryInfocolumnList"
:tableData="inventoryInfo"
@ -446,6 +386,7 @@
</el-dialog>
</template>
<!-- 包件信息 -->
<template v-if="isaddvalue">
<el-dialog v-model="isaddvalue" title="包件信息" width="100%" :model="addvalue">
<!-- 列表模块 -->
@ -470,40 +411,6 @@
> -->
</template>
</tablecmt>
<!-- <el-table
ref="packageList"
v-loading="loading"
@selection-change="selectionPackageChange"
:data="packageData"
:height="height"
style="width: 100%"
:border="option.border"
>
<el-table-column
type="selection"
v-if="option.selection"
:selectable="checkPackage"
align="center"
width="55"
></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="60" align="center">
</el-table-column>
<template v-for="(item, index) in option.columnParcels">
<el-table-column
v-if="item.hide !== true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index"
>
</el-table-column>
</template>
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{ row }">
</template>
</el-table-column>
</el-table> -->
<el-form-item style="margin-left: 45%; margin-top: 5px">
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitPackage"
>提交(包件)
@ -513,6 +420,7 @@
</el-dialog>
</template>
<!-- 客户信息 -->
<el-dialog v-model="dialogVisible" title="客户信息" width="30%" :model="clientData">
<el-row :gutter="24" class="rows">
<el-col :xl="6" :lg="7" :md="8" :sm="24">
@ -578,6 +486,7 @@ export default {
packageQuery: {},
reservationloading: false,
orderRow: {},
/** 订单 */
columnList: [
{
prop: '',
@ -598,7 +507,7 @@ export default {
width: '55',
checkarr: [],
fixed: true,
sortable: true,
sortable: false,
head: false,
},
{
@ -703,7 +612,7 @@ export default {
{
prop: 'storeTime',
label: '在库时间',
type: 5,
type: 2,
values: '',
width: '150',
checkarr: [],
@ -791,6 +700,7 @@ export default {
hide: true,
},
],
/** 库存品 */
stockcolumnList: [
// {
// prop: '',
@ -820,7 +730,7 @@ export default {
width: '55',
checkarr: [],
fixed: true,
sortable: true,
sortable: false,
head: false,
},
{
@ -1106,6 +1016,7 @@ export default {
},
// ...
],
/** 新增订单 */
stockArtcolumnList: [
{
prop: '',
@ -1382,6 +1293,7 @@ export default {
hide: true,
},
],
/** 新增库存品 */
inventoryInfocolumnList: [
{
prop: '',
@ -1686,6 +1598,7 @@ export default {
// },
// ...
],
/** 包件信息 */
columnParcels: [
{
prop: '',
@ -1932,6 +1845,9 @@ export default {
view: false,
//
query: {},
/** 订单查询 */
orderQuery: {},
stockQuery: {},
//
page: {
currentPage: 1,
@ -1995,7 +1911,10 @@ export default {
marketName: '',
//
packageDataSec: [],
/** 库存品数据 */
inventoryData: [],
/** 库存品渲染数据 */
renderInventoryData: [],
orderData: [],
renderOrderData: [],
stockListShow: false,
@ -2614,12 +2533,15 @@ export default {
}
this.orderData.forEach((item, index) => {
if (item.id === row.id) {
console.log('111 :>> ', 111);
this.orderData.splice(index, 1);
const _index = this.renderOrderData.indexOf(item);
this.renderOrderData.splice(_index, 1);
}
console.log(this.orderData, '当前存在的数据');
});
console.log('this.renderOrderData :>> ', this.renderOrderData);
console.log('this.orderData :>> ', this.orderData);
// ,
if (this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '';
// ,
@ -2638,8 +2560,10 @@ export default {
this.inventoryData.forEach((item, index) => {
if (item.id === row.id) {
this.inventoryData.splice(index, 1);
const _index = this.renderInventoryData.indexOf(item);
this.renderInventoryData.splice(_index, 1);
}
console.log(item);
});
// ,
if (this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '';
@ -2739,6 +2663,60 @@ export default {
// this.inventoryList = a;
// }
},
/** 订单搜索 */
handleSearchOrder(value, row, type) {
//
if (type === 1) {
//
const reg = new RegExp(value, 'i');
this.orderQuery[row.prop] = reg;
if (value === '') delete this.orderQuery[row.prop];
}
if (Object.keys(this.orderQuery).length === 0)
return (this.renderOrderData = [...this.orderData]);
const _data = this.orderData.filter(value => {
let _flag = true;
for (let key in this.orderQuery) {
if (!this.orderQuery[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
});
this.renderOrderData = _data;
},
/** 库存品搜索 */
handleSearchStock(value, row, type) {
//
if (type === 1) {
//
const reg = new RegExp(value, 'i');
this.stockQuery[row.prop] = reg;
if (value === '') delete this.stockQuery[row.prop];
}
if (Object.keys(this.stockQuery).length === 0)
return (this.renderInventoryData = [...this.inventoryData]);
const _data = this.inventoryData.filter(value => {
let _flag = true;
for (let key in this.stockQuery) {
if (!this.stockQuery[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
});
this.renderInventoryData = _data;
},
onSubmitUpdateZeroOrder() {
console.log('this.obj--------------------->', this.obj);
console.log('this.zeroOrderData--------------------->', this.zeroOrderData);
@ -2893,6 +2871,7 @@ export default {
}
this.inventoryData = stockArr;
this.handleSearchStock();
this.stockListShow = false;
},
@ -2954,6 +2933,7 @@ export default {
...this.orderData,
...this.orderList.filter(item => !_ids.includes(item.id)),
];
this.handleSearchOrder();
this.orderShow = false;
},
selectionClear() {
@ -3221,7 +3201,7 @@ export default {
this.form.deliveryType = typeService;
this.form.deliveryAddress = address;
this.orderData = data;
this.renderOrderData = this.orderData;
this.renderOrderData = [...this.orderData];
});
}
if (this.reservationId) {
@ -3236,12 +3216,13 @@ export default {
//
this.marketName = reservation.mallName;
this.orderData = reservation.stockArticleList;
this.renderOrderData = this.orderData;
this.renderOrderData = [...this.orderData];
this.inventoryData = reservation.inventoryList;
this.inventoryData.forEach(item => {
item.quantityOccupied -= item.reservationNum;
item.applyNum = item.quantityStock - item.quantityOccupied;
});
this.renderInventoryData = [...this.inventoryData];
this.form.deliveryType = reservation.deliveryType;
this.form.periodOfTime = reservation.periodOfTime;
if (reservation.serveType) {

Loading…
Cancel
Save