From 8900951225b5379dc6b444678d9cebcbca271347 Mon Sep 17 00:00:00 2001 From: 13208366016 <47278630@qq.com> Date: Sat, 11 Nov 2023 15:53:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distributionDeliveryListmar.vue | 14 ++++++++++++- .../reservation/reservationAddFrom.vue | 14 +++++++++++-- .../stockup/distributionStockupMarket.vue | 21 ++++++++++++++++++- vite.config.js | 4 ++-- 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/src/views/distribution/deliverylist/distributionDeliveryListmar.vue b/src/views/distribution/deliverylist/distributionDeliveryListmar.vue index db2d437c..dd64bb0b 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListmar.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListmar.vue @@ -6,6 +6,9 @@ <el-form :inline="true" :model="query" class="fr-fo"> <el-form-item label="配送车次:"> <el-input v-model="query.trainNumber" placeholder="请输入配送车次"></el-input> + </el-form-item> + <el-form-item label="客户名称:"> + <el-input v-model="query.clineName" placeholder="请客户名称"></el-input> </el-form-item> <el-form-item label="配送日期:" class="el-times"> <el-date-picker v-model="query.taskTime" type="date" placeholder="选择日期"> @@ -413,7 +416,16 @@ export default { fixed: false, sortable: true, }, - + { + prop: 'clineName', + label: '客户名称', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'kindName', label: '配送种类', diff --git a/src/views/distribution/reservation/reservationAddFrom.vue b/src/views/distribution/reservation/reservationAddFrom.vue index 8ef46d18..f68746c7 100644 --- a/src/views/distribution/reservation/reservationAddFrom.vue +++ b/src/views/distribution/reservation/reservationAddFrom.vue @@ -124,7 +124,7 @@ <el-tabs type="border-card"> <el-tab-pane label="订单"> - <el-button type="primary" link @click="handleAddOrder">新 增</el-button> + <el-button class='el-btn-xz' type="primary" link @click="handleAddOrder">新 增</el-button> <tablecmt :columnList="columnList" :tableData="orderData" @@ -199,7 +199,7 @@ </el-tab-pane> <el-tab-pane label="库存品"> - <el-button link @click="handleAddInventory">新 增</el-button> + <el-button class='el-btn-xz' link @click="handleAddInventory">新 增</el-button> <tablecmt :columnList="stockcolumnList" :tableData="inventoryData" @@ -2930,3 +2930,13 @@ -moz-appearance: textfield; } </style> + +<style lang='scss' scoped> +.el-btn-xz{ + width: 68px; + height: 26px; + border: 1px solid; + margin-bottom: 8px; + border-radius: 4px; +} +</style> diff --git a/src/views/distribution/stockup/distributionStockupMarket.vue b/src/views/distribution/stockup/distributionStockupMarket.vue index 36015aa8..8a0711fb 100644 --- a/src/views/distribution/stockup/distributionStockupMarket.vue +++ b/src/views/distribution/stockup/distributionStockupMarket.vue @@ -13,7 +13,8 @@ <el-form-item label="指派状态;1-未指派、2-已指派:"> <el-input v-model="query.assignStatus" placeholder="请输入指派状态;1-未指派、2-已指派"></el-input> </el-form-item>--> - <el-form-item label="备货时间:" class="el-times"> + <div class='el-input-so'> + <el-form-item label="备货时间:" class="el-times"> <el-date-picker v-model="stockupDate" type="datetimerange" @@ -24,6 +25,10 @@ :shortcuts="shortcuts" /> </el-form-item> + <el-form-item style="margin-left: 24px;" label="客户名称"> + <el-input v-model="query.consignee" placeholder="请输入客户名称" /> + </el-form-item> + </div> <!-- 查询按钮 --> <el-form-item> <el-button type="primary" icon="el-icon-search" @click="searchChange">搜 索</el-button> @@ -340,6 +345,17 @@ export default { sortable: true, head: false, }, + { + prop: 'consignee', + label: '客户名称', + type: 2, + values: '', + width: '130', + checkarr: [], + fixed: true, + sortable: true, + head: false, + }, { prop: 'stockupDate', label: '备货时间', @@ -1142,5 +1158,8 @@ export default { flex: 1; display: flex; align-items: flex-end; +} +.el-input-so{ + } </style> diff --git a/vite.config.js b/vite.config.js index c695de61..1dd07766 100644 --- a/vite.config.js +++ b/vite.config.js @@ -18,9 +18,9 @@ export default ({ mode, command }) => { // lmy // target: 'http://192.168.10.123:8889', // cyz - target: 'http://192.168.10.75:8777', + // target: 'http://192.168.10.75:8777', // tjj - // target: 'http://192.168.10.29:13000', + target: 'http://192.168.10.29:13000', // sst // target: 'http://192.168.10.94:8888', // target: 'http://192.168.10.29:13000', From 03f58d101a2a0b6b6154d6a31c2b559d8f1e6e11 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Sat, 11 Nov 2023 16:07:02 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=8D=95=E5=8B=BE=E9=80=89=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reservation/reservationAddFrom.vue | 604 ++++++++---------- .../warehouseWarehouseingAddReceipt.vue | 143 +++-- 2 files changed, 353 insertions(+), 394 deletions(-) diff --git a/src/views/distribution/reservation/reservationAddFrom.vue b/src/views/distribution/reservation/reservationAddFrom.vue index 8ef46d18..6492ae4c 100644 --- a/src/views/distribution/reservation/reservationAddFrom.vue +++ b/src/views/distribution/reservation/reservationAddFrom.vue @@ -240,84 +240,88 @@ <el-button icon="el-icon-circle-close" @click="$router.go(-1)">返 回</el-button> </el-form-item> - <el-dialog v-model="orderShow" title="在库订单信息" 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" 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> - - <!-- 查询按钮 --> - <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" - :loading="loading" - @inputTxt="inputscStockArtic" - @timeCheck="timescStockArtic" - @btnCheck="btnscStockArtic" - @selectCheck="selectscStockArtic" - @selection="selectionChange" - > - <template #default="slotProps"> - <el-text - type="primary" - link - icon="el-icon-edit" - @click="removeStockList(slotProps.scope.row)" - >移除 - </el-text - > - </template> - </tablecmt> - - <el-row> - <div class="avue-crud__pagination" style="width: 100%"> - <!-- 分页模块 --> - <el-pagination - align="right" - background - @size-change="sizeOrderChange" - @current-change="currentOrderChange" - :current-page="page.currentPage" - :page-sizes="[30, 50, 80, 120]" - :page-size="page.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="page.total" - > - </el-pagination> - </div> - </el-row> - <el-form-item style="margin-left: 45%; margin-top: 5px"> - <el-button type="primary" icon="el-icon-circle-close" @click="onSubmitOrder" - >提交(订单) - </el-button - > - <el-button icon="el-icon-circle-close" @click="orderShow = false">返 回</el-button> - </el-form-item> - </el-dialog> + <template v-if="orderShow"> + <el-dialog v-model="orderShow" title="在库订单信息" 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" 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> + + <!-- 查询按钮 --> + <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" + :checkselect="orderSelectList" + :loading="loading" + @inputTxt="inputscStockArtic" + @timeCheck="timescStockArtic" + @btnCheck="btnscStockArtic" + @selectCheck="selectscStockArtic" + @selection="selectionChange" + > + <template #default="slotProps"> + <!-- orderSelectList --> + <el-text + type="primary" + link + icon="el-icon-edit" + @click="removeStockList(slotProps.scope.row)" + >移除 + </el-text + > + </template> + </tablecmt> + + <el-row> + <div class="avue-crud__pagination" style="width: 100%"> + <!-- 分页模块 --> + <el-pagination + align="right" + background + @size-change="sizeOrderChange" + @current-change="currentOrderChange" + :current-page="page.currentPage" + :page-sizes="[30, 50, 80, 120]" + :page-size="page.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="page.total" + > + </el-pagination> + </div> + </el-row> + <el-form-item style="margin-left: 45%; margin-top: 5px"> + <el-button type="primary" icon="el-icon-circle-close" @click="onSubmitOrder" + >提交(订单) + </el-button + > + <el-button icon="el-icon-circle-close" @click="orderShow = false">返 回</el-button> + </el-form-item> + </el-dialog> + </template> <el-dialog @@ -376,128 +380,134 @@ </el-form-item> </el-dialog> - <el-dialog v-model="stockListShow" title="库存品信息" width="100%"> - <!-- :before-close="handleClose"--> - <el-form :inline="true" :model="query"> - <el-form-item label="商场名称:"> - <el-input v-model="query.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> - <!-- 查询按钮 --> - <el-form-item> - <el-button type="primary" icon="el-icon-search" @click="searchStockList" - >搜 索 - </el-button - > - <el-button icon="el-icon-delete" @click="stockListSearchReset()">清 空</el-button> - </el-form-item> - </el-form> - <tablecmt - :columnList="inventoryInfocolumnList" - :tableData="inventoryInfo" - :loading="loading" - @inputTxt="inputsc" - @timeCheck="timesc" - @btnCheck="btnsc" - @selectCheck="selectsc" - @selection="selectionInventoryChange" - ref=multipleTable - > - <template #default="slotProps"> - <el-text - type="primary" - link - icon="el-icon-edit" - @click="removeStockList(slotProps.scope.row)" - >移除 - </el-text - > - </template> - </tablecmt> - <el-form-item style="margin-left: 45%; margin-top: 5px"> - <el-button type="primary" icon="el-icon-circle-close" @click="onSubmitInventory" - >提交(库存品) - </el-button - > - <el-button icon="el-icon-circle-close" @click="stockListShow = false">返 回</el-button> - </el-form-item> - </el-dialog> + <template v-if="stockListShow"> - <el-dialog v-model="isaddvalue" title="包件信息" width="100%" :model="addvalue"> - <!-- 列表模块 --> - <!-- :isselectfun="checkPackage"--> - <tablecmt - :columnList="columnParcels" - :tableData="packageData" - :checkselect="packageDataSec" - :loading="loading" - @selection="selectionPackageChange" - @select='tableAllSelection' - @cell-mouse-enter='hove' - > - <template #default="slotProps"> - <!-- <el-text - type="primary" - link - icon="el-icon-edit" - @click="removeStockList(slotProps.scope.row)" - >移除</el-text - > --> - </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-dialog v-model="stockListShow" title="库存品信息" width="100%"> + <!-- :before-close="handleClose"--> + <el-form :inline="true" :model="query"> + <el-form-item label="商场名称:"> + <el-input v-model="query.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> + <!-- 查询按钮 --> + <el-form-item> + <el-button type="primary" icon="el-icon-search" @click="searchStockList" + >搜 索 + </el-button + > + <el-button icon="el-icon-delete" @click="stockListSearchReset()">清 空</el-button> + </el-form-item> + </el-form> + <tablecmt + :columnList="inventoryInfocolumnList" + :tableData="inventoryInfo" + :checkselect="inventorySelectList" + :loading="loading" + @inputTxt="inputsc" + @timeCheck="timesc" + @btnCheck="btnsc" + @selectCheck="selectsc" + @selection="selectionInventoryChange" + ref=multipleTable + > + <template #default="slotProps"> + <el-text + type="primary" + link + icon="el-icon-edit" + @click="removeStockList(slotProps.scope.row)" + >移除 + </el-text + > + </template> + </tablecmt> + <el-form-item style="margin-left: 45%; margin-top: 5px"> + <el-button type="primary" icon="el-icon-circle-close" @click="onSubmitInventory" + >提交(库存品) + </el-button + > + <el-button icon="el-icon-circle-close" @click="stockListShow = false">返 回</el-button> + </el-form-item> + </el-dialog> + </template> + + <template v-if="isaddvalue"> + <el-dialog v-model="isaddvalue" title="包件信息" width="100%" :model="addvalue"> + <!-- 列表模块 --> + <!-- :isselectfun="checkPackage"--> + <tablecmt + :columnList="columnParcels" + :tableData="packageData" + :checkselect="packageDataSec" + :loading="loading" + @selection="selectionPackageChange" + @select='tableAllSelection' + @cell-mouse-enter='hove' + > + <template #default="slotProps"> + <!-- <el-text + type="primary" + link + icon="el-icon-edit" + @click="removeStockList(slotProps.scope.row)" + >移除</el-text + > --> + </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 - v-if="item.hide !== true" - :prop="item.prop" - :label="item.label" - :width="item.width" - :key="index" - > + 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> - <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" - >提交(包件) - </el-button - > - <el-button icon="el-icon-circle-close" @click="isaddvalue = false">返 回</el-button> - </el-form-item> - </el-dialog> + <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" + >提交(包件) + </el-button + > + <el-button icon="el-icon-circle-close" @click="isaddvalue = false">返 回</el-button> + </el-form-item> + </el-dialog> + </template> <el-dialog v-model="dialogVisible" @@ -1779,7 +1789,9 @@ packageData: [], packageList: [], inventoryList: [], + inventorySelectList:[], orderList: [], + orderSelectList: [], inventoryTable: [], inventoryShow: false, reservationRules: { @@ -1887,11 +1899,12 @@ }); this.onLoad(this.page); }, + tableAllSelection(){}, //查询出所有的市配订单 - handleAddOrder() { + async handleAddOrder() { this.loading = true; //这里只需要对订单进行正常的搜索即可 - this.onLoadOrder(this.page); + await this.onLoadOrder(this.page); this.loading = false; this.orderShow = true; }, @@ -1920,28 +1933,22 @@ console.log('res :>> ', res); this.inventoryInfo = inventoryList.records - - //存在库存品,需要将库存品进行回显勾选 - if (this.inventoryData) { - this.inventoryInfo.forEach((item, index) => { - this.inventoryData.forEach(inventory => { - if (item.id === inventory.id) { - item = inventory; - this.$nextTick(() => { - this.$refs.inventoryTable.toggleRowSelection(this.inventoryInfo[index], true); - }); - } - }); - }); - } - console.log('------------->', this.inventoryData); + if (this.inventoryData.length !== 0) { + // 获取ids的映射数组 + const ids = this.inventoryData.map(val => val.id) + // 赋值给回显勾选的数组 + this.inventorySelectList = this.inventoryInfo.filter(val => { + // 循环获取符合条件的库存品组成数组 + return ids.includes(val.id) + }) + } this.loading = false; this.selectionClear(); + this.stockListShow = true; } ); this.query = {}; this.inventoryList = []; - this.stockListShow = true; }, handleCheckedCitiesChange(value) { if (value) { @@ -2095,7 +2102,7 @@ // this.selectionPackageChange(row) // console.log( this.selectionPackageChange(),'12312312312321函数'); // } - viewStockArticlePackage(row) { + async viewStockArticlePackage(row) { this.loading = true; this.packageList = row.packageList; this.obj = row; @@ -2103,92 +2110,30 @@ this. toggleAllSelection console.log('row>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row); if (this.reservationId) { - getReservationPackageListByOrderId(this.reservationId,row.id,page.currentPage,page.pageSize).then(res=>{ + const res = await getReservationPackageListByOrderId(this.reservationId,row.id,page.currentPage,page.pageSize) console.log("->>>>>>>>>>>>>>>>>>查看包件",res); - this.packageData = res.data.data.data.packageList - console.log(this.packageData,'需要的信息'); - console.log(res.data.data.data.reservationPackageList); - let idList=[] - res.data.data.data.reservationPackageList.forEach(v=>{ - idList.push(v.id) - }) - console.log(idList); - }) - // 自动选中 - - - - - // //这里就是编辑的数据回显问题 - // let packageInfo = row.parcelListVOS; - // // this.packageData = row.parcelListVOS; - // let packageListData = this.packageData; - // if (row.packageList.length > 0) { - // let packageListInfo = row.packageList; - // packageInfo.forEach((item, index) => { - // packageListInfo.forEach(p => { - // if (item.id === p.id) { - // this.$nextTick(() => { - // this.$refs.packageList.toggleRowSelection(this.packageData[index], true); - // }); - // } - // }); - // }); - // } else { - // //新增订单,默认全选 - // packageInfo.forEach((item, index) => { - // this.$nextTick(() => { - // this.$refs.packageList.toggleRowSelection(this.packageData[index], true); - // }); - // }); - // } - // this.packageData = row.parcelListVOS; - // - // // 当row内packageList为空时, 默认全选 - // if (row.packageList.length === 0) { - // this.packageDataSec = row.parcelListVOS; - // } else { - // this.packageDataSec = row.parcelListVOS.filter(item => { - // return row.packageList.some(value => value.id === item.id); - // }); - // } - + if (res.data.data){ + this.packageData = res.data.data.data.packageList + let idList=res.data.data.data.reservationPackageList.map(v=>{ + return v.id + }) + this.packageDataSec = this.packageData.filter(val => idList.includes(val.id)) + } + this.isaddvalue = true; + this.loading = false; } else { getPackageListByStockArticleId(page.currentPage,page.pageSize,row.id).then(res=>{ console.log("res---------------->",res); - console.log(res.data.data.records); - this.packageData=res.data.data.records - - }) - // this.packageData = row.parcelListVOS; - // this.packageDataSec = row.parcelListVOS; - // //这里回显展示的效果应该是展示被其他预约单勾选的订单处于禁用勾选,冻结订单处于禁用无法勾选,其他默认为全选 - // let data = row.parcelListVOS; - // data.forEach((item, index) => { - // if ( - // item.orderPackageReservationStatusName === '已预约' || - // item.orderPackageReservationStatus === '20' - // ) { - // // //这里就是表示包件此时状态处于已预约,表示该订单下的这个包件信息被其他的预约信息使用,此时应该处于勾选禁用状态 - // this.$nextTick(() => { - // this.$refs.packageList.toggleRowSelection(this.packageData[index], true); - // }); - // // console.log('::', item); - // // this.checkPackage(item, index); - // } - // // else if ( - // // item.orderPackageFreezeStatusName !== '已冻结' || - // // item.orderPackageFreezeStatus !== '20' - // // ) { - // // this.$nextTick(() => { - // // this.$refs.packageList.toggleRowSelection(this.packageData[index], true); - // // }); - // // } - // }); - } + // console.log(res.data.data.records); + if(res.data.data){ + this.packageData=res.data.data.records + // 新增默认勾选全部 + this.packageDataSec = this.packageData + } this.isaddvalue = true; this.loading = false; - + }) + } }, // 选择包件信息 @@ -2385,6 +2330,10 @@ }); } }, + inputsc(){}, + timesc(){}, + selectsc(){}, + btnsc(){}, handleClose(done) { this.$confirm('确认关闭?') .then(_ => { @@ -2494,7 +2443,7 @@ }, selectionInventoryChange(list) { // if (this.reservationId){ - console.log('-----------<>', list); + console.log('list-----------<>', list); this.inventoryList = list; // }else { // //新增 @@ -2633,6 +2582,7 @@ return; } this.marketName = _marketName; + console.log('this.inventoryList :>> ', this.inventoryList); this.inventoryData = this.inventoryList; // if (this.orderData.length) { @@ -2801,7 +2751,7 @@ } this.onLoadOrder(this.page); }, - onLoadOrder(page, params = {}) { + async onLoadOrder(page, params = {}) { this.query.typeService = 2; this.query.genre = '1'; this.query.marketName = this.marketName @@ -2814,41 +2764,37 @@ } this.query.orderIds = a.join(','); console.log('--------------query>', this.query); - selectStockArticleInfoList( + const res = await selectStockArticleInfoList( page.currentPage, page.pageSize, Object.assign(params, this.query) - ).then(res => { - console.log('res123------------>', res); - const { records, total } = res.data.data; - this.stockArticleInfo = records.filter(value => { - if (this.marketName === '') return value; - if (this.marketName) { - console.log('value.marketName :>> ', value.marketName); - return value.mallName === this.marketName; - } - }); - // const {records, total} = res.data.data; - this.stockArticleInfo = records - console.log('this.stockArticleInfo :>> ', this.stockArticleInfo); - this.stockArticleInfo.forEach((item, index) => { - //检查订单是否冻结 - this.checkOrder(item, index); - // if (this.orderData) { - // this.orderData.forEach(o => { - // if (o.id === item.id) { - // this.$nextTick(() => { - // this.$refs.orderList.toggleRowSelection(this.stockArticleInfo[index], true); - // }); - // } - // }); - // }else { - // this.orderList = []; - // } - this.page.total = total; - }); - this.orderList = []; + ) + const { records, total } = res.data.data; + this.stockArticleInfo = records + console.log('this.stockArticleInfo :>> ', this.stockArticleInfo); + this.stockArticleInfo.forEach((item, index) => { + //检查订单是否冻结 + this.checkOrder(item, index); + // if (this.orderData) { + // this.orderData.forEach(o => { + // if (o.id === item.id) { + // this.$nextTick(() => { + // this.$refs.orderList.toggleRowSelection(this.stockArticleInfo[index], true); + // }); + // } + // }); + // }else { + // this.orderList = []; + // } + this.page.total = total; }); + if(this.orderData.length !== 0){ + const ids = this.orderData.map(val => val.id) + this.orderSelectList = this.stockArticleInfo.filter(val => ids.includes(val.id)) + console.log('orderSelectList :>> ', this.orderSelectList); + } + this.orderList = []; + return null }, onLoad() { diff --git a/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue b/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue index 482b3eba..205f461b 100644 --- a/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue +++ b/src/views/warehouse/warehousingentry/warehouseWarehouseingAddReceipt.vue @@ -102,11 +102,7 @@ </el-form-item> <!-- <el-form-item label="物流单号" prop="trainNumber">--> <el-form-item label="物流运单号"> - <el-input - v-model="form.trainNumber" - clearable - placeholder="请输入物流运单号" - /> + <el-input v-model="form.trainNumber" clearable placeholder="请输入物流运单号" /> </el-form-item> <!-- <el-form-item label="入库车牌" prop="licensePlate">--> @@ -274,6 +270,7 @@ @click="handleSubmit" :disabled="view && !this.$route.query.type == '3'" v-if="this.$route.query.type" + :loading="buttonLoadingList.handleSubmitBtn" >提 交</el-button > <el-button @@ -282,10 +279,23 @@ @click="showCommitButton" :disabled="view && !this.$route.query.type == '3'" v-else-if="!hideButton" - >提 交</el-button> + >提 交</el-button + > <span v-else-if="hideButton"> - <el-button icon="el-icon-circle-check" @click="handleSubmit"> 预约入库 </el-button> - <el-button icon="el-icon-circle-check" @click="handleHirectStorage"> + <el-button + icon="el-icon-circle-check" + :disabled="buttonLoadingList.handleHirectStorageBtn" + :loading="buttonLoadingList.handleSubmitBtn" + @click="handleSubmit" + > + 预约入库 + </el-button> + <el-button + icon="el-icon-circle-check" + :disabled="buttonLoadingList.handleSubmitBtn" + :loading="buttonLoadingList.handleHirectStorageBtn" + @click="handleHirectStorage" + > 直接入库 </el-button> </span> @@ -440,7 +450,7 @@ import { update, remove, getWarehouseDetail, - getList + getList, } from '@/api/warehouse/warehouseWarehousingEntry'; import option from '@/option/warehouse/warehouseWarehousingDetail'; import { mapGetters, mapMutations } from 'vuex'; @@ -537,6 +547,10 @@ export default { serviceType: [{ required: true, message: '请选择服务类型', trigger: 'blur' }], customerCode: [{ required: true, message: '请选择客户编码', trigger: 'blur' }], }, + buttonLoadingList: { + handleSubmitBtn: false, + handleHirectStorageBtn: false, + }, }; }, mounted() { @@ -593,16 +607,15 @@ export default { let b = await getWarehouseDetail(a); // 新增回显功能,如果当前参数没用值就用预计入库数量显示 - b.data.data.list.forEach(item=>{ - if(!item.actualReceipt){ - item.actualReceipt = item.createInventory - } - - }) + b.data.data.list.forEach(item => { + if (!item.actualReceipt) { + item.actualReceipt = item.createInventory; + } + }); console.log('bbbb>>>>', b.data.data); const da = b.data.data; - console.log(b,'接收到的值'); - + console.log(b, '接收到的值'); + this.options.push({ label: da.customerName, code: da.customerCode, @@ -741,7 +754,7 @@ export default { let cl = await getListIdsName(this.page.currentPage, this.page.pageSize, { brandName: query, ids: si, - type: !!this.form.storeId ? 2 : 1 + type: !!this.form.storeId ? 2 : 1, }); console.log('>>>>', cl.data.data); cl.data.data.forEach(i => { @@ -946,7 +959,9 @@ export default { } }); if (this.data.length > 0) { - console.log('当前在这里=-================================================================'); + console.log( + '当前在这里=-================================================================' + ); if (!!this.formDetail.createInventory) { let s = false; this.data.some(i => { @@ -1011,43 +1026,37 @@ export default { this.hideButton = true; }, handleSubmit() { - this.$refs.form.validate(valid => { - if (valid) { - if (!this.form.id) { - console.log('this.form111', this.form); - if (this.data.length > 0) { - this.form.list = this.data; - // 预约入库类型为1 - this.form.type = '1'; - add(this.form).then(() => { + this.$refs.form.validate(async valid => { + try { + // 开启防抖 + this.buttonLoadingList.handleSubmitBtn = true; + if (valid) { + if (!this.form.id) { + console.log('this.form111', this.form); + if (this.data.length > 0) { + this.form.list = this.data; + // 预约入库类型为1 + this.form.type = '1'; + await add(this.form); this.box = false; this.onLoad(this.page); this.$message({ type: 'success', message: '操作成功!', }); - }); - this.form = {}; - this.data = []; + this.form = {}; + this.data = []; + } else { + this.$message.warning('请添加物资详情!!!'); + } } else { - this.$message.warning('请添加物资详情!!!'); - } - } else { - // console.log("修改!!!"); - // if(!this.form.orderNumber){ - // this.$message.warning("请完善订单自编号!!"); - // return ; - // } - // if(parseInt(this.$route.query.type) == 3){ - // - // } - console.log('this.form222', this.form); - if (!!this.form.totalInput && parseInt(this.form.totalInput) == '-1') { - this.form.totalInput = null; - } - this.form.type = '1'; - this.form.list = this.data; - update(this.form).then(() => { + console.log('this.form222', this.form); + if (!!this.form.totalInput && parseInt(this.form.totalInput) == '-1') { + this.form.totalInput = null; + } + this.form.type = '1'; + this.form.list = this.data; + await update(this.form); this.box = false; this.onLoad(this.page); this.$message({ @@ -1058,8 +1067,12 @@ export default { this.$store.commit('DEL_TAG', this.$store.state.tags.tag); // 操作完成后返回入库列表页面 this.$router.push('/warehouse/warehousingentry/warehouseWarehousingEntry'); - }); + } } + } catch (error) { + } finally { + // 关闭防抖 + this.buttonLoadingList.handleSubmitBtn = false; } }); }, @@ -1099,16 +1112,16 @@ export default { // this.form = {} this.box = true; //查询品牌 - this.getBingPai(); + this.getBingPai(); }, - async getBingPai(){ + async getBingPai() { console.log('客户ID', this.form.clientId); this.brandList = []; if (!!this.form.clientId) { let si = !!this.form.storeId ? this.form.storeId : this.form.clientId; let cl = await getListIdsName(this.page.currentPage, this.page.pageSize, { ids: si, - type: !!this.form.storeId ? 2 : 1 + type: !!this.form.storeId ? 2 : 1, }); console.log('>>>>', cl.data.data); cl.data.data.forEach(i => { @@ -1235,10 +1248,9 @@ export default { * @returns {Promise<void>} */ async getWareHoust(page, params = {}) { - - let sl ={}; - let li = await getDetailWarehouse( sl); - console.log("li>>>>",li.data.data); + let sl = {}; + let li = await getDetailWarehouse(sl); + console.log('li>>>>', li.data.data); this.store = []; li.data.data.forEach(i => { let st = { @@ -1249,7 +1261,8 @@ export default { // 如果仓库只有一条数据时, 直接回显 if (this.store.length === 1) { console.log('this.store.length :>> ', [...this.store]); - this.form.warehouseId = this.store[0].value;} + this.form.warehouseId = this.store[0].value; + } }); /* if(b.data.data.deptCategory == "4"){ @@ -1280,13 +1293,13 @@ export default { }*/ }, // 获取列表数据 - async getListData(data){ - data.currentPage = data.currentPage || 1; // 当前页码, 默认为1 - data.pageSize = data.pageSize || 10; // 当前页数, 默认为10 - const res = await getList(data.currentPage, data.pageSize, {conditions: data.conditions}) - // 抛出数据 - return res - } + async getListData(data) { + data.currentPage = data.currentPage || 1; // 当前页码, 默认为1 + data.pageSize = data.pageSize || 10; // 当前页数, 默认为10 + const res = await getList(data.currentPage, data.pageSize, { conditions: data.conditions }); + // 抛出数据 + return res; + }, }, }; </script> From b366314c114ccd492a6c0e93c00af0934aa08ff0 Mon Sep 17 00:00:00 2001 From: 13208366016 <47278630@qq.com> Date: Sat, 11 Nov 2023 19:00:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=B8=82=E9=85=8D=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=97=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/distribution/reservation/reservationAddFrom.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/distribution/reservation/reservationAddFrom.vue b/src/views/distribution/reservation/reservationAddFrom.vue index f68746c7..7ec655ee 100644 --- a/src/views/distribution/reservation/reservationAddFrom.vue +++ b/src/views/distribution/reservation/reservationAddFrom.vue @@ -15,12 +15,14 @@ </el-form-item> </el-col> <el-col :span="10"> - <el-form-item label="预约时间:" prop="reservationDate" label-width="100px"> + <el-form-item label="预约时间:" label-width="100px"> <el-date-picker v-model="form.reservationDate" type="date" clearable placeholder="选择日期时间" + format="YYYY/MM/DD" + value-format="YYYY-MM-DD" > </el-date-picker> </el-form-item> @@ -2297,6 +2299,7 @@ this.isaddvalue = false; }, onSubmit() { + // 提交按钮 //新增预约单 let orderIds = []; let inventoryIds = []; @@ -2860,7 +2863,7 @@ this.form.replaceFee = 0; this.form.collectionFee = 0; this.form.isUrgent = '1'; - this.form.reservationDate = new Date(); + // this.form.reservationDate = new Date(); if (this.orderIds) { getStockArticleList(this.orderIds).then(res => { console.log(res.data.data); From 79066f066cd97b8de90f0d86420b5913df3cdd7a Mon Sep 17 00:00:00 2001 From: 13208366016 <47278630@qq.com> Date: Sat, 11 Nov 2023 23:55:03 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=8E=B7=E5=8F=96=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/index/index.vue | 4 ++-- vite.config.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/page/index/index.vue b/src/page/index/index.vue index 5a676b23..f06e9713 100644 --- a/src/page/index/index.vue +++ b/src/page/index/index.vue @@ -78,8 +78,8 @@ export default { created() { getMyCurrentWarehouse().then(res => { console.log(res, '初始化请求参数'); - console.log(res.data.name, '仓库名称'); - localStorage.setItem('WarehouseName', res.data.name); + console.log(res.data.data.name, '仓库名称'); + localStorage.setItem('WarehouseName', res.data.data.name); }); }, mounted() { diff --git a/vite.config.js b/vite.config.js index 1dd07766..8e6ca901 100644 --- a/vite.config.js +++ b/vite.config.js @@ -20,11 +20,11 @@ export default ({ mode, command }) => { // cyz // target: 'http://192.168.10.75:8777', // tjj - target: 'http://192.168.10.29:13000', + // target: 'http://192.168.10.29:13000', // sst // target: 'http://192.168.10.94:8888', // target: 'http://192.168.10.29:13000', - // target: 'http://test.api.huitongys.com', + target: 'http://test.api.huitongys.com', // target: 'http://h5uapi.huitongys.com', changeOrigin: true, rewrite: path => path.replace(/^\/api/, ''),