Browse Source

修复新增预约单选择的问题

master
qb 1 year ago
parent
commit
b9c4cbf7d9
  1. 5
      src/views/distribution/inventory/distributionStockList.vue
  2. 31
      src/views/distribution/inventory/distributionStockListDetails.vue
  3. 12
      src/views/distribution/reservation/reservationAddFrom.vue

5
src/views/distribution/inventory/distributionStockList.vue

@ -72,7 +72,7 @@
</template> </template>
</tablecmt> </tablecmt>
</el-row> </el-row>
<el-row class='el-fy'> <el-row class="el-fy">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> <div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div>
<!-- 分页模块 --> <!-- 分页模块 -->
@ -1090,6 +1090,7 @@ export default {
query: { query: {
marketId: row.row.marketId, marketId: row.row.marketId,
materialId: row.row.materialId, materialId: row.row.materialId,
incomingBatch: row.row.incomingBatch,
name: row.row.descriptionGoods + ' — 明细', name: row.row.descriptionGoods + ' — 明细',
}, },
}); });
@ -1286,6 +1287,6 @@ export default {
.el-fy { .el-fy {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
</style> </style>

31
src/views/distribution/inventory/distributionStockListDetails.vue

@ -129,7 +129,9 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="入库明细" name="enter"> <el-tab-pane label="入库明细" name="enter">
<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
>
<tablecmt <tablecmt
:columnList="columnListarrs.columnWarehousing" :columnList="columnListarrs.columnWarehousing"
:tableData="data2" :tableData="data2"
@ -221,7 +223,9 @@ import {
add, add,
update, update,
remove, remove,
getListAllocation, stockExport, stockInfoExport getListAllocation,
stockExport,
stockInfoExport,
} from '@/api/distribution/distributionStockList'; } from '@/api/distribution/distributionStockList';
import option from '@/option/distribution/distributionStockList'; import option from '@/option/distribution/distributionStockList';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -475,7 +479,8 @@ export default {
fixed: false, fixed: false,
sortable: true, sortable: true,
head: false, head: false,
}, { },
{
prop: 'stockQuantity', prop: 'stockQuantity',
label: '数量', label: '数量',
type: 2, type: 2,
@ -566,28 +571,30 @@ 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.marketId = this.queryOwn.marketId; row.marketId = this.queryOwn.marketId;
row.serviceType = this.queryOwn.serviceType; row.serviceType = this.queryOwn.serviceType;
row.materialId = this.queryOwn.materialId; row.materialId = this.queryOwn.materialId;
row.warehouseId = this.queryOwn.warehouseId; row.warehouseId = this.queryOwn.warehouseId;
row.storeId = !!this.queryOwn.storeId && this.queryOwn.storeId != '-1' ? this.queryOwn.storeId : null; row.storeId =
!!this.queryOwn.storeId && this.queryOwn.storeId != '-1' ? this.queryOwn.storeId : null;
if (!!this.queryOwn.pid) { if (!!this.queryOwn.pid) {
row.pid = this.queryOwn.pid; row.pid = this.queryOwn.pid;
} }
stockInfoExport(row).then( res =>{ stockInfoExport(row).then(res => {
console.log(res.data); console.log(res.data);
downloadXls(res.data, `${this.$route.query.name}库存品入库明细数据.xlsx`); downloadXls(res.data, `${this.$route.query.name}库存品入库明细数据.xlsx`);
}); });
}, },
inputsc() {},
timesc() {},
btnsc() {},
selectsc() {},
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
console.log(tab.props.name); console.log(tab.props.name);
@ -790,7 +797,9 @@ export default {
this.query.serviceType = this.queryOwn.serviceType; this.query.serviceType = this.queryOwn.serviceType;
this.query.materialId = this.queryOwn.materialId; this.query.materialId = this.queryOwn.materialId;
this.query.warehouseId = this.queryOwn.warehouseId; this.query.warehouseId = this.queryOwn.warehouseId;
this.query.storeId = !!this.queryOwn.storeId && this.queryOwn.storeId != '-1' ? this.queryOwn.storeId : null; this.query.incomingBatch = this.$route.query.incomingBatch;
this.query.storeId =
!!this.queryOwn.storeId && this.queryOwn.storeId != '-1' ? this.queryOwn.storeId : null;
if (!!this.queryOwn.pid) { if (!!this.queryOwn.pid) {
this.query.pid = this.queryOwn.pid; this.query.pid = this.queryOwn.pid;
} }

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

@ -1067,7 +1067,7 @@ export default {
label: '订单自编号', label: '订单自编号',
type: 2, type: 2,
values: '', values: '',
width: '150', width: '260',
checkarr: [], checkarr: [],
fixed: false, fixed: false,
sortable: true, sortable: true,
@ -2639,7 +2639,7 @@ export default {
onSubmitOrder() { onSubmitOrder() {
console.log('orderList-------------》', this.orderList); console.log('orderList-------------》', this.orderList);
if (this.orderList.length === 0) return this.$message.warning('最少选择一条数据!!!'); if (this.orderList.length === 0) return this.$message.warning('最少选择一条数据!!!');
const list = this.orderList; const list = [...this.orderList, ...this.orderData];
let _name = list[0].customerName; let _name = list[0].customerName;
let _address = list[0].customerAddress; let _address = list[0].customerAddress;
let _phone = list[0].customerTelephone; let _phone = list[0].customerTelephone;
@ -2678,7 +2678,6 @@ export default {
...this.orderData, ...this.orderData,
...this.orderList.filter(item => !_ids.includes(item.id)), ...this.orderList.filter(item => !_ids.includes(item.id)),
]; ];
this.orderShow = false; this.orderShow = false;
}, },
selectionClear() { selectionClear() {
@ -2806,9 +2805,8 @@ export default {
Object.assign(params, this.query) Object.assign(params, this.query)
); );
const { records, total } = res.data.data; const { records, total } = res.data.data;
const _filterArr = records
this.stockArticleInfo = records;
// this.stockArticleInfo = records;
console.log('this.stockArticleInfo :>> ', this.stockArticleInfo); console.log('this.stockArticleInfo :>> ', this.stockArticleInfo);
this.stockArticleInfo.forEach((item, index) => { this.stockArticleInfo.forEach((item, index) => {
// //
@ -2817,7 +2815,7 @@ export default {
}); });
if (this.orderData.length !== 0) { if (this.orderData.length !== 0) {
const ids = this.orderData.map(val => val.id); const ids = this.orderData.map(val => val.id);
const _orderData = this.stockArticleInfo.filter(val => !ids.includes(val.id)); this.stockArticleInfo = this.stockArticleInfo.filter(val => !ids.includes(val.id));
// this.orderSelectList = this.stockArticleInfo.filter(val => ids.includes(val.id)); // this.orderSelectList = this.stockArticleInfo.filter(val => ids.includes(val.id));
console.log('orderSelectList :>> ', this.orderSelectList); console.log('orderSelectList :>> ', this.orderSelectList);
} }

Loading…
Cancel
Save