Commit 4cec9ad3 by LJM

寄售申请

parent 3fedc517
......@@ -3491,6 +3491,11 @@
"integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==",
"dev": true
},
"china-division": {
"version": "2.7.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/china-division/-/china-division-2.7.0.tgz",
"integrity": "sha512-4uUPAT+1WfqDh5jytq7omdCmHNk3j+k76zEG/2IqaGcYB90c2SwcixttcypdsZ3T/9tN1TTpBDoeZn+Yw/qBEA=="
},
"chokidar": {
"version": "3.5.1",
"resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.5.1.tgz?cache=0&sync_timestamp=1610719430924&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.5.1.tgz",
......@@ -5136,6 +5141,14 @@
"integrity": "sha1-hX4xDKAPC3XaTh22/w4HPMSpHd8=",
"dev": true
},
"element-china-area-data": {
"version": "6.1.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/element-china-area-data/-/element-china-area-data-6.1.0.tgz",
"integrity": "sha512-IkpcjwQv2A/2AxFiSoaISZ+oMw1rZCPUSOg5sOCwT5jKc96TaawmKZeY81xfxXsO0QbKxU5LLc6AirhG52hUmg==",
"requires": {
"china-division": "^2.7.0"
}
},
"element-ui": {
"version": "2.15.13",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.13.tgz",
......
......@@ -11,6 +11,7 @@
"axios": "^0.21.1",
"core-js": "^3.6.5",
"echarts": "^5.4.2",
"element-china-area-data": "^6.1.0",
"element-ui": "^2.15.13",
"vue": "^2.6.11",
"vue-clipboard2": "^0.3.1",
......
......@@ -3,19 +3,19 @@
<div class="section-page">
<!--搜索区-->
<el-form :inline="true" :model="formParam" ref="formParam" label-width="96px">
<el-form-item label="寄售召回单号" prop="sku_id">
<el-input v-model="formParam.sku_id" placeholder="请输入寄售召回单号" @keyup.enter.native="submit" clearable></el-input>
<el-form-item label="寄售召回单号" prop="recall_sn">
<el-input v-model="formParam.recall_sn" placeholder="请输入寄售召回单号" @keyup.enter.native="submit" clearable></el-input>
</el-form-item>
<el-form-item label="型号" prop="goods_name">
<el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="formParam.status" placeholder="全部" clearable>
<el-select v-model="formParam.recall_status" placeholder="全部" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="待提审" value="1"></el-option>
<el-option label="待审核" value="2"></el-option>
<el-option label="待退货出库" value="3"></el-option>
<el-option label="完成" value="4"></el-option>
<el-option label="待提审" value="0"></el-option>
<el-option label="待审核" value="1"></el-option>
<el-option label="待退货出库" value="2"></el-option>
<el-option label="完成" value="3"></el-option>
<el-option label="作废" value="4"></el-option>
</el-select>
</el-form-item>
......@@ -28,29 +28,77 @@
<div class="operation-area row verCenter bothSide">
<div class="operation-button row verCenter">
<el-button type="primary" @click="$router.push('/batchRecall')">批量召回</el-button>
<el-button type="primary">提交审核</el-button>
<el-button type="primary">作废</el-button>
<el-button type="danger">收货信息</el-button>
<el-button type="primary" @click="popupEvent(1)">提交审核</el-button>
<el-button type="primary" @click="popupEvent(2)">作废</el-button>
<el-button type="danger" @click="popupEvent(3)"> 收货信息</el-button>
</div>
</div>
<!--列表区-->
<div class="data-box">
<el-table :data="list" border max-height="600" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="40" align="center" fixed></el-table-column>
<el-table-column prop="msg_sn" label="单号" :show-overflow-tooltip="true" align="center">
<el-table-column prop="msg_sn" label="寄售召回单号" :show-overflow-tooltip="true" align="center">
<template slot-scope="scope">
<el-link type="primary" @click="$router.push('/consignmentImportDetail')">{{ scope.row.id }}</el-link>
<el-link type="primary" :underline="false" @click="$router.push({path: '/consignmentApplicationDetail', query: {consignment_id: scope.row.consignment_id}})" style="font-size: 12px;">{{ scope.row.recall_sn }}</el-link>
</template>
</el-table-column>
<el-table-column prop="msg_type" label="文件名字" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="msg_type" label="状态" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="msg_type" label="导入方式" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="id" label="导入成功" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="id" label="导入失败" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="create_time" label="上传时间" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="recall_status_val" label="订单状态" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="order_uname" label="订单人员" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="verify_name" 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>
<el-table-column prop="verify_remark" label="审核说明" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="create_uname" label="创建人" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="create_time" label="创建时间" width="160" :show-overflow-tooltip="true" align="center"></el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div>
<!--提交审核-->
<el-dialog title="提交审核" :close-on-click-modal="false" :visible.sync="dialogVisible_1" width="500px">
<p style="margin-bottom: 15px;margin-left: 80px;">确定将选择的商品提交寄售召回审核?</p>
<el-form ref="form" label-width="80px">
<el-form-item label="附加说明">
<el-input type="textarea" v-model="remark"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible_1 = false">取 消</el-button>
<el-button type="primary" @click="verifyConsignmentRecall">确 定</el-button>
</div>
</el-dialog>
<!--作废-->
<el-dialog title="作废" :close-on-click-modal="false" :visible.sync="dialogVisible_2" width="500px">
<p style="margin-bottom: 15px;margin-left: 80px;">确定将选择的寄售召回单作废?</p>
<el-form ref="form" label-width="80px">
<el-form-item label="原因说明">
<el-input type="textarea" v-model="remark"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible_2 = false">取 消</el-button>
<el-button type="primary" @click="cancelConsignmentRecall">确 定</el-button>
</div>
</el-dialog>
<!--收货信息-->
<el-dialog title="收货信息" :close-on-click-modal="false" :visible.sync="dialogVisible_3" width="500px">
<el-form :model="updateConsignmentRecallReceiptInfoParams" label-width="80px" size="mini" :rules="rules" ref="updateConsignmentRecallReceiptInfoParams">
<el-form-item label="收货人" prop="contact">
<el-input v-model="updateConsignmentRecallReceiptInfoParams.contact" placeholder="请输入收货人"></el-input>
</el-form-item>
<el-form-item label="收货电话" prop="mobile">
<el-input v-model="updateConsignmentRecallReceiptInfoParams.mobile" placeholder="请输入收货电话"></el-input>
</el-form-item>
<el-form-item label="收货地址" prop="province">
<el-cascader size="mini" placeholder="请选择收货地址省市区" :options="options" v-model="selectedOptions" @change="handleChange" style="width: 100%" :props="{ checkStrictly: false }"></el-cascader>
</el-form-item>
<el-form-item prop="detail">
<el-input type="textarea" v-model="updateConsignmentRecallReceiptInfoParams.detail" placeholder="请输入详细地址"></el-input>
</el-form-item>
<el-form-item size="mini" style="text-align: right">
<el-button @click="dialogVisible_3 = false">取消</el-button>
<el-button type="primary" @click="updateConsignmentRecallReceiptInfo('updateConsignmentRecallReceiptInfoParams')">确定</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
<Menu></Menu>
</div>
......@@ -58,24 +106,57 @@
<script>
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import {Autocomplete, Button, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui'
import {Autocomplete, Button, Cascader, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui'
import {codeToText, regionData} from 'element-china-area-data'
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Link).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(Button).use(Link).use(Cascader).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag).use(Divider);
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Descriptions).use(DescriptionsItem);
export default {
name: "consignmentRecall",
data() {
return {
options: regionData,
selectedOptions: [],
multipleSelection: [],
total: 0,
page: 1,
limit: 10,
list: [],
dialogVisible_1: false,
dialogVisible_2: false,
dialogVisible_3: false,
recall_ids: '',
remark: '',
rules: {
contact: [
{required: true, message: '请输入收货人', trigger: 'blur'},
],
mobile: [
{required: true, message: '请输入收货电话', trigger: 'blur'},
],
province: [
{required: true, message: '请选择收货地址', trigger: 'change'},
],
detail: [
{required: true, message: '请输入详细地址', trigger: 'blur'},
]
},
updateConsignmentRecallReceiptInfoParams: {
contact: '',//收货人
mobile: '',//收货电话
country: '中国',//国家
province: '',//省
city: '',//市
district: '',//区
detail: ''//详细地址
},
formParam: {
status: '',
date: ''
recall_sn: '',
goods_name: '',
recall_status: ''
}
};
},
......@@ -84,24 +165,31 @@ export default {
},
methods: {
getData() {
var params = Object.assign({}, this.formParam,
{page: this.page, limit: this.limit},
{start_time: this.formParam.date ? this.formParam.date[0] : ''},
{end_time: this.formParam.date ? this.formParam.date[1] : ''}
);
this.$http('GET', "/api/message/getMsgList", params).then(res => {
this.$http('GET', "/api/consignmentRecall/getConsignmentRecallList", this.formParam).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.total) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
this.$message.error(res.msg);
}
})
},
/**
* 省市区级联选择监听
* @param value
*/
handleChange(value) {
if (value && value.length) {
this.updateConsignmentRecallReceiptInfoParams.province = codeToText[value[0]];
this.updateConsignmentRecallReceiptInfoParams.city = codeToText[value[1]];
this.updateConsignmentRecallReceiptInfoParams.district = codeToText[value[2]];
} else {
this.updateConsignmentRecallReceiptInfoParams.province = '';
this.updateConsignmentRecallReceiptInfoParams.city = '';
this.updateConsignmentRecallReceiptInfoParams.district = '';
}
},
/**
* 型号监听
* @param queryString
* @param cb
......@@ -161,6 +249,95 @@ export default {
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 弹窗事件
*/
popupEvent(type) {
if (type == 1 || type == 2) {
if (!this.multipleSelection.length) {
this.$message.warning('请选择数据');
return;
}
}
switch (type) {
case 1:
// 提交审核:校验待提审状态
const invalidVerify = this.multipleSelection.filter(item => item.recall_status !== '0');
if (invalidVerify.length) {
this.$message.warning('只能选择待提审状态的数据');
return;
}
this.recall_ids = this.multipleSelection.map(item => item.recall_id).join(',');
this.dialogVisible_1 = true;
break;
case 2:
// 作废:校验待提审或进行中(未发货未入库)状态
const invalidCancel = this.multipleSelection.filter(item => !(['0', '2'].includes(item.recall_status)));
if (invalidCancel.length) {
this.$message.warning('待提审、待退货出库状态才可作废');
return;
}
this.recall_ids = this.multipleSelection.map(item => item.recall_id).join(',');
this.dialogVisible_2 = true;
break;
case 3:
this.dialogVisible_3 = true;
break;
}
},
/**
* 提交审核
*/
verifyConsignmentRecall() {
this.$http('POST', "/api/consignmentRecall/verifyConsignmentRecall", {recall_ids: this.recall_ids, remark: this.remark}).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.dialogVisible_1 = false;
this.remark = '';
this.getData();
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
},
/**
* 作废
*/
cancelConsignmentRecall() {
this.$http('POST', "/api/consignmentRecall/cancelConsignmentRecall", {recall_ids: this.recall_ids, cancel_remark: this.remark}).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.dialogVisible_2 = false;
this.remark = '';
this.getData();
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
},
/**
* 寄售召回-修改收货地址
*/
updateConsignmentRecallReceiptInfo(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
}
},
components: {
......
......@@ -3,7 +3,7 @@
<div class="section-page">
<!--搜索区-->
<el-form :inline="true" :model="formParam" ref="formParam" label-width="80px">
<el-form-item label="状态" prop="status">
<el-form-item label="没对接" prop="status">
<el-select v-model="formParam.status" placeholder="全部" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="待处理" value="1"></el-option>
......
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