Commit 4991bdf0 by LJM

Merge branch 'feature/handa/0224_wuliu' into dev/ver/1.0.0

parents e551f6a3 9f71066d
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<div class="operation-area row verCenter bothSide"> <div class="operation-area row verCenter bothSide">
<div class="operation-button row verCenter"> <div class="operation-button row verCenter">
<el-button type="primary" @click="popupEvent(1)">提交审核</el-button> <el-button type="primary" @click="popupEvent(1)">提交审核</el-button>
<el-button type="primary" @click="popupEvent(4)">填写物流</el-button>
<el-button type="primary" @click="popupEvent(2)">作废</el-button> <el-button type="primary" @click="popupEvent(2)">作废</el-button>
<el-button type="primary" @click="popupEvent(3)">关单</el-button> <el-button type="primary" @click="popupEvent(3)">关单</el-button>
<el-tooltip placement="top" effect="dark"> <el-tooltip placement="top" effect="dark">
...@@ -52,6 +53,8 @@ ...@@ -52,6 +53,8 @@
<el-table-column prop="deliver_status_val" label="发货状态" width="90" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="deliver_status_val" label="发货状态" width="90" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="stock_in_status_val" label="入库状态" width="90" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="stock_in_status_val" label="入库状态" width="90" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="order_uname" label="订单人员" width="100" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="order_uname" label="订单人员" width="100" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="shipping_id_val" label="物流公司" width="100" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="shipping_no" label="物流单号" width="100" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="update_time" label="更新时间" width="160" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="update_time" label="更新时间" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="verify_uname" label="审核人" width="100" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="verify_uname" label="审核人" width="100" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="verify_time" label="审核时间" width="160" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="verify_time" label="审核时间" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
...@@ -98,6 +101,43 @@ ...@@ -98,6 +101,43 @@
<el-button type="primary" @click="closeConsignment">确 定</el-button> <el-button type="primary" @click="closeConsignment">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--填写物流-->
<el-dialog title="填写寄件物流" :close-on-click-modal="false" :visible.sync="dialogVisible_4" width="400px">
<el-form :model="updateShippingInfoParasm" label-width="80px" size="mini" :rules="rules" ref="updateShippingInfoParasm">
<el-form-item label="物流公司" prop="shipping_id">
<el-select v-model="updateShippingInfoParasm.shipping_id" placeholder="请选择物流公司" clearable style="width: 100%">
<el-option label="顺丰速运" value="1"></el-option>
<el-option label="快递送货" value="4"></el-option>
<el-option label="韵达快递" value="5"></el-option>
<el-option label="速尔快递" value="8"></el-option>
<el-option label="TNT快递" value="9"></el-option>
<el-option label="白提" value="10"></el-option>
<el-option label="京东快递" value="11"></el-option>
<el-option label="DHL国际快递" value="12"></el-option>
<el-option label="联邦快递" value="13"></el-option>
<el-option label="优速物流" value="15"></el-option>
<el-option label="顺丰特惠" value="16"></el-option>
<el-option label="UPS" value="17"></el-option>
<el-option label="中通快递" value="18"></el-option>
<el-option label="德邦速运" value="21"></el-option>
<el-option label="供应商配送" value="100"></el-option>
<el-option label="Kerry Express" value="26"></el-option>
<el-option label="Thailand Post" value="27"></el-option>
<el-option label="Viettel Post" value="28"></el-option>
<el-option label="VNPost" value="29"></el-option>
<el-option label="Giao Hàng Tiết Kiệm" value="30"></el-option>
<el-option label="Giao Hàng Nhanh" value="31"></el-option>
</el-select>
</el-form-item>
<el-form-item label="物流单号" prop="shipping_no">
<el-input v-model="updateShippingInfoParasm.shipping_no" placeholder="请输入物流单号,多个用逗号隔开"></el-input>
</el-form-item>
<el-form-item size="mini" style="text-align: right">
<el-button @click="dialogVisible_4 = false">取消</el-button>
<el-button type="primary" @click="updateShippingInfo('updateShippingInfoParasm')">确定</el-button>
</el-form-item>
</el-form>
</el-dialog>
<Menu></Menu> <Menu></Menu>
</div> </div>
</template> </template>
...@@ -122,12 +162,31 @@ export default { ...@@ -122,12 +162,31 @@ export default {
dialogVisible_1: false, dialogVisible_1: false,
dialogVisible_2: false, dialogVisible_2: false,
dialogVisible_3: false, dialogVisible_3: false,
dialogVisible_4: false,
remark: '', remark: '',
consignment_ids: '', consignment_ids: '',
rules: {
shipping_id: [
{required: true, message: '请选择物流公司', trigger: 'blur'},
],
shipping_no: [
{required: true, message: '请输入物流单号', trigger: 'blur'},
{
pattern: /^[a-zA-Z0-9,,]*$/,
message: '物流单号只能输入英文、数字、中英文逗号',
trigger: 'blur'
}
]
},
formParam: { formParam: {
consignment_sn: '', consignment_sn: '',
goods_name: '', goods_name: '',
consignment_status: '' consignment_status: ''
},
updateShippingInfoParasm:{
consignment_ids:'',
shipping_id:'',
shipping_no:''
} }
}; };
}, },
...@@ -239,9 +298,9 @@ export default { ...@@ -239,9 +298,9 @@ export default {
return; return;
} }
// 作废:校验 待提审或进行中且待入库状态为待入库 // 作废:校验 待提审或进行中且待入库状态为待入库
const invalidCancel = this.multipleSelection.filter(item => { var invalidCancel = this.multipleSelection.filter(item => {
const isPendingReview = item.consignment_status === 0; var isPendingReview = item.consignment_status === 0;
const isInProgressAndPendingStock = item.consignment_status === 2 && item.stock_in_status === 1; var isInProgressAndPendingStock = item.consignment_status === 2 && item.stock_in_status === 1;
return !(isPendingReview || isInProgressAndPendingStock); return !(isPendingReview || isInProgressAndPendingStock);
}); });
if (invalidCancel.length) { if (invalidCancel.length) {
...@@ -257,7 +316,7 @@ export default { ...@@ -257,7 +316,7 @@ export default {
return; return;
} }
// 关单的条件:状态:进行(consignment_status=2)中且入库状态:部分入库(stock_in_status=2) // 关单的条件:状态:进行(consignment_status=2)中且入库状态:部分入库(stock_in_status=2)
const invalidClose = this.multipleSelection.filter(item => { var invalidClose = this.multipleSelection.filter(item => {
return item.consignment_status != 2 || item.stock_in_status != 2; return item.consignment_status != 2 || item.stock_in_status != 2;
}); });
if (invalidClose.length) { if (invalidClose.length) {
...@@ -267,9 +326,50 @@ export default { ...@@ -267,9 +326,50 @@ export default {
this.consignment_ids = this.multipleSelection.map(item => item.consignment_id).join(','); this.consignment_ids = this.multipleSelection.map(item => item.consignment_id).join(',');
this.dialogVisible_3 = true; this.dialogVisible_3 = true;
break; break;
case 4:
// 填写物流:校验待提审、待审核、进行中状态
var invalidShipping = this.multipleSelection.filter(item =>
![0, 1, 2].includes(item.consignment_status)
);
if (invalidShipping.length) {
this.$message.warning('只能为待提审、待审核、进行中状态的数据填写物流');
return;
}
this.updateShippingInfoParasm.consignment_ids = this.multipleSelection.map(item => item.consignment_id).join(',');
this.dialogVisible_4 = true;
break;
} }
}, },
/** /**
* 填写物流
*/
updateShippingInfo(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
// 保存的时候,如果物流单号有中文逗号自动转化成英文逗号保存
this.updateShippingInfoParasm.shipping_no = this.updateShippingInfoParasm.shipping_no.replace(/,/g, ',');
this.$http('POST', "/api/consignment/updateShippingInfo", this.updateShippingInfoParasm).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.dialogVisible_4 = false;
this.getData();
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
} else {
console.log('error submit!!');
return false;
}
});
},
/**
* 提交审核 * 提交审核
*/ */
verifyConsignment() { verifyConsignment() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment