Browse Source

添加预约页面调整

dev-warehouse
kilo 2 years ago
parent
commit
910f6bc9cb
  1. 6
      src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue
  2. 97
      src/views/distribution/reservation/reservation.vue
  3. 83
      src/views/distribution/reservation/reservationFrom.vue

6
src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue

@ -167,13 +167,7 @@
row.code = code[2];
}
}
//
if (!!this.form.administrativeAreas){
row.administrativeAreas = this.form.administrativeAreas.join(";")
}
console.log(">>>row",row);
update(row).then(() => {
this.onLoad(this.page);

97
src/views/distribution/reservation/reservation.vue

@ -82,103 +82,6 @@
</el-pagination>
</div>
</el-row>
<!-- 表单模块 -->
<el-dialog :title="title"
v-model="box"
width="50%"
:before-close="beforeClose"
append-to-body>
<el-form :disabled="view" ref="form" :model="form" label-width="80px">
<!-- 表单字段 -->
<el-form-item label="订单自编号" v-if="isUpdate" prop="orderId">
<el-input v-model="form.orderId" placeholder="请输入订单自编号;订单自编号,关联订单表"/>
</el-form-item>
<el-form-item label="收货人" prop="consignee">
<el-input v-model="form.consignee" placeholder="请输入收货人"/>
</el-form-item>
<el-form-item label="收件人电话" prop="deliveryPhone">
<el-input v-model="form.deliveryPhone" placeholder="请输入收件人电话"/>
</el-form-item>
<el-form-item label="收件地址" prop="deliveryAddress">
<el-input v-model="form.deliveryAddress" placeholder="请输入收件地址"/>
</el-form-item>
<el-form-item label="预约时间:" prop="reservationDate">
<el-date-picker
v-model="form.reservationDate"
type="date"
clearable
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="预约时间:" prop="periodOfTime">
<el-radio v-model="form.periodOfTime" :label="'1'" :value="'1'">上午</el-radio>
<el-radio v-model="form.periodOfTime" :label="'2'" :value="'2'">下午</el-radio>
<el-radio v-model="form.periodOfTime" :label="'3'" :value="'3'">全天</el-radio>
</el-form-item>
<el-form-item label="配送类型:" prop="serveType">
<el-radio v-model="form.deliveryType" :label="'1'" :value="'1'">市配</el-radio>
<el-radio v-model="form.deliveryType" :label="'2'" :value="'2'">商配</el-radio>
</el-form-item>
<el-form-item label="配送方式" prop="deliveryType">
<el-radio-group v-model="form.deliveryWay">
<el-radio v-model="form.deliveryWay" :label="'1'" :value="'1'">送货</el-radio>
<el-radio v-model="form.deliveryWay" :label="'2'" :value="'2'">送货上楼</el-radio>
<el-radio v-model="form.deliveryWay" :label="'3'" :value="'3'">送装一体</el-radio>
<el-radio v-model="form.deliveryWay" :label="'4'" :value="'4'"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="到付运费" v-if="isUpdate" :disAbled="true" prop="collectFee">
<el-input v-model="form.collectFee" placeholder="请输入到付运费"/>
</el-form-item>
<el-form-item label="服务类型" prop="serveType">
<el-checkbox-group v-model="form.serveType">
<el-checkbox v-for="item in this.addvalueServeTypeData" :label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="代付运费" v-if="isUpdate" prop="replaceFee">
<el-input v-model="form.replaceFee" placeholder="请输入代付运费"/>
</el-form-item>
<el-form-item label="其他费用" prop="otherFee">
<el-input v-model="form.otherFee" placeholder="请输入其他费用"/>
</el-form-item>
<el-form-item label="预约信息状态" v-if="isUpdate" prop="resvervationStatus">
<el-input v-model="form.resvervationStatus" placeholder="请输入预约信息状态;预约列表信息状态;1-待确认、2-已确认"/>
</el-form-item>
<el-form-item label="订单来源" v-if="isUpdate" prop="orderSource">
<el-input v-model="form.orderSource" placeholder="请输入订单来源"/>
</el-form-item>
<el-form-item label="备货状态" v-if="isUpdate" prop="stockupStatus">
<el-input v-model="form.stockupStatus" placeholder="请输入备货状态;备货状态;1-未备货、2-待备货、3-已备货"/>
</el-form-item>
<el-form-item label="备货区编号" v-if="isUpdate" prop="goodsShelfId">
<el-input v-model="form.goodsShelfId" placeholder="请输入备货区编号"/>
</el-form-item>
<!-- <el-form-item label="预留1" prop="reserve1">-->
<!-- <el-input v-model="form.reserve1" placeholder="请输入预留1"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留2" prop="reserve2">-->
<!-- <el-input v-model="form.reserve2" placeholder="请输入预留2"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留3" prop="reserve3">-->
<!-- <el-input v-model="form.reserve3" placeholder="请输入预留3"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留4" prop="reserve4">-->
<!-- <el-input v-model="form.reserve4" placeholder="请输入预留4"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留5" prop="reserve5">-->
<!-- <el-input v-model="form.reserve5" placeholder="请输入预留5"/>-->
<!-- </el-form-item>-->
</el-form>
<!-- 表单按钮 -->
<template #footer>
<span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"> </el-button>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</span>
</template>
</el-dialog>
</div>
</basic-container>
</template>

83
src/views/distribution/reservation/reservationFrom.vue

@ -32,10 +32,13 @@
</el-col>
<el-col :span="10">
<el-form-item label="时&emsp;&emsp;段:" prop="deliveryAddress" label-width="100px">
<el-radio-group v-model="form.periodOfTime">
<el-radio v-for="item in this.periodOfTimeData" :label="item.dictValue"
:value="item.dictKey"></el-radio>
<el-radio-group v-model="form.periodOfTime" v-for="item in this.periodOfTimeData">
<el-radio
:label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-radio>
</el-radio-group>
<!-- :label="item.dictValue"-->
</el-form-item>
</el-col>
@ -50,9 +53,10 @@
<el-col :span="10">
<el-form-item label="配送类型:" prop="serveType" label-width="100px">
<el-radio-group v-model="form.deliveryType">
<el-radio v-for="item in this.deliveryTypeData" :label="item.dictValue"
:value="item.dictKey"></el-radio>
<el-radio-group v-model="form.deliveryType" v-for="item in this.deliveryTypeData">
<el-radio
:label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -66,15 +70,15 @@
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="form.textarea">
v-model="form.remarks">
</el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="配送方式:" prop="serveType" label-width="100px">
<el-radio-group v-model="form.deliveryWay">
<el-radio v-for="item in this.deliveryWayData" :label="item.dictValue"
:value="item.dictKey"></el-radio>
<el-radio-group v-model="form.deliveryWay" v-for="item in this.deliveryWayData" >
<el-radio :label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -92,9 +96,9 @@
<el-col :span="10">
<el-form-item label="服务类型:" prop="serveType" label-width="100px">
<!-- <el-input v-model="form.serveType" clearable placeholder="请选择服务类型"/>-->
<el-checkbox-group v-model="serveType">
<el-checkbox v-for="item in this.addvalueServeTypeData" :label="item.dictValue"
:value="item.dictKey"></el-checkbox>
<el-checkbox-group v-model="serveType" v-for="item in this.addvalueServeTypeData">
<el-checkbox :label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
@ -644,7 +648,7 @@
let inventoryList = [];
let stockArticleList = [];
this.orderData.forEach(item => {
if (item.number > item.handQuantity || !item.number) {
if (item.reservationNum > item.handQuantity || !item.reservationNum) {
this.$message({
type: 'warning',
message: '请输入' + item.orderSelfNumbering + '正确数量!'
@ -652,23 +656,21 @@
return;
}
orderIds.push(item.id);
item.reservationNum = item.number;
item.reservationNum = item.reservationNum;
stockArticleList.push(item);
});
this.inventoryData.forEach(item => {
if (!item.number || item.number > item.quantityStock) {
if (!item.reservationNum || item.reservationNum > item.quantityStock) {
this.$message({
type: 'warning',
message: '请输入' + item.orderSelfNumbering + '正确数量!'
});
return;
}
item.reservationNum = item.number;
item.reservationNum = item.reservationNum;
inventoryIds.push(item.id);
inventoryList.push(item);
});
console.log('>>>>>>>>>>>', this.inventoryData);
console.log('>>>>>>>>>>>', this.orderData);
orderIds.join(',');
inventoryIds.join(',');
this.form.stockArticleIds = orderIds.toString();
@ -690,20 +692,19 @@
this.form.periodOfTime = item.dictKey;
}
});
let a = [];
this.addvalueServeTypeData.forEach(item => {
this.serveType.forEach(type => {
if (type === item.dictValue) {
a.push(item.dictKey);
// this.form.serveType=item.dictKey;
}
});
});
this.form.serveType = a.toString();
// let a = [];
// this.addvalueServeTypeData.forEach(item => {
// this.form.serveType.forEach(type => {
// if (type === item.dictValue) {
// a.push(item.dictKey);
// // this.form.serveType=item.dictKey;
// }
// });
// });
this.form.serveType = this.serveType.join(",")
console.log('^^^^^^^^^^', this.form);
add(this.form).then(() => {
this.box = false;
this.onLoad(this.page);
this.$router.go(-1);
this.$message({
type: 'success',
@ -792,7 +793,6 @@
return;
}
if (this.orderData.length > 0) {
this.selectionList.some(i => {
console.log('asdgfasdv', i);
let a = this.orderData.filter((ele) => ele.customerName != i.customerName || ele.customerTelephone != i.customerTelephone || ele.customerAddress != i.customerAddress).length >= 1;
@ -869,16 +869,23 @@
}
if (this.reservationId) {
getReservationInfo(this.reservationId).then(res => {
this.form = res.data.data;
this.orderData = res.data.data.stockArticleList;
this.inventoryData = res.data.data.inventoryList;
console.log(res.data.data);
const reservation = res.data.data;
this.orderData = reservation.stockArticleList;
this.inventoryData = reservation.inventoryList;
this.form.deliveryType = reservation.deliveryType;
this.form.periodOfTime = reservation.periodOfTime;
this.form.periodOfTime = reservation.periodOfTime;
if (reservation.serveType){
this.serveType = Array.from(reservation.serveType)
}
this.form = reservation;
console.log("<<<<<<<<<<<<<<",res.data.data);
});
}
getInventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.inventoryInfo = data.records;
const inventoryList = res.data.data;
this.page.total = inventoryList.total;
this.inventoryInfo = inventoryList.records;
this.loading = false;
this.selectionClear();
});

Loading…
Cancel
Save