|
@@ -22,7 +22,13 @@
|
|
|
</template>
|
|
|
|
|
|
<template slot="is_addr">
|
|
|
- <el-tag size="mini">{{sitem.is_addr === '0' ? '无地址退货' : sitem.is_addr === '1' ? '有地址退货' : '--'}}</el-tag>
|
|
|
+ <el-tag size="mini">{{
|
|
|
+ sitem.is_addr === "0"
|
|
|
+ ? "无地址退货"
|
|
|
+ : sitem.is_addr === "1"
|
|
|
+ ? "有地址退货"
|
|
|
+ : "--"
|
|
|
+ }}</el-tag>
|
|
|
</template>
|
|
|
|
|
|
<template slot="order_type">
|
|
@@ -49,9 +55,9 @@
|
|
|
<i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
- <template slot="loop_total">
|
|
|
- <span>供应商负责人共修改供应商审批结果 {{sitem.loop_total}} 次</span>
|
|
|
- </template>
|
|
|
+ <template slot="loop_total">
|
|
|
+ <span>供应商负责人共修改供应商审批结果 {{ sitem.loop_total }} 次</span>
|
|
|
+ </template>
|
|
|
|
|
|
<template slot="companyName">
|
|
|
<span>{{ sitem.customer_name }}</span>
|
|
@@ -66,9 +72,10 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
<template slot="is_active">
|
|
|
- <span v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
|
|
|
+ <span
|
|
|
+ v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
|
|
|
><span
|
|
|
- >{{ sitem.is_activity + '' === "1" ? "参与活动" : "不参与活动" }}/{{
|
|
|
+ >{{ sitem.is_activity + "" === "1" ? "参与活动" : "不参与活动" }}/{{
|
|
|
sitem.good_type
|
|
|
}}</span
|
|
|
></span
|
|
@@ -77,9 +84,9 @@
|
|
|
</template>
|
|
|
<template slot="send_type">
|
|
|
<el-tag :size="'mini'">{{
|
|
|
- sitem.send_type + '' === "1"
|
|
|
+ sitem.send_type + "" === "1"
|
|
|
? "有地址下单"
|
|
|
- : sitem.send_type + '' === "2"
|
|
|
+ : sitem.send_type + "" === "2"
|
|
|
? "无地址下单"
|
|
|
: "--"
|
|
|
}}</el-tag>
|
|
@@ -145,12 +152,29 @@
|
|
|
</show-data-table>
|
|
|
</el-collapse-item>
|
|
|
|
|
|
-
|
|
|
- <el-collapse-item title="申请退货的发货单" name="8" v-if="sitem && sitem.is_addr === '1'">
|
|
|
- <child-list ref="childListRef" :sitem="sitem" @getCurrentWorkOrderCount="_currentOrderWork => currentWorkOrder = _currentOrderWork" @getWorkOrderCount="_workOrderCount => workOrderCount = _workOrderCount" @getSendInfoFirst="onGetSendInfoFirst"/>
|
|
|
+ <el-collapse-item
|
|
|
+ title="申请退货的发货单"
|
|
|
+ name="8"
|
|
|
+ v-if="sitem && sitem.is_addr === '1'"
|
|
|
+ >
|
|
|
+ <child-list
|
|
|
+ ref="childListRef"
|
|
|
+ :sitem="sitem"
|
|
|
+ @getCurrentWorkOrderCount="
|
|
|
+ (_currentOrderWork) => (currentWorkOrder = _currentOrderWork)
|
|
|
+ "
|
|
|
+ @getWorkOrderCount="
|
|
|
+ (_workOrderCount) => (workOrderCount = _workOrderCount)
|
|
|
+ "
|
|
|
+ @getSendInfoFirst="onGetSendInfoFirst"
|
|
|
+ />
|
|
|
</el-collapse-item>
|
|
|
|
|
|
- <el-collapse-item title="待业务审核" name="3" v-if="isHasPermission({status:'1', process:'1'})">
|
|
|
+ <el-collapse-item
|
|
|
+ title="待业务审核"
|
|
|
+ name="3"
|
|
|
+ v-if="isHasPermission({ status: '1', process: '1' })"
|
|
|
+ >
|
|
|
<exam-form
|
|
|
v-if="newTime"
|
|
|
:statusList="statusList"
|
|
@@ -160,7 +184,14 @@
|
|
|
@searchChange="examForm"
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
- <el-collapse-item title="待供应商审核" name="4" v-if="isHasPermission({status:'9', process:'9'}) && String(sitem.has_account) === '0'">
|
|
|
+ <el-collapse-item
|
|
|
+ title="待供应商审核"
|
|
|
+ name="4"
|
|
|
+ v-if="
|
|
|
+ isHasPermission({ status: '9', process: '9' }) &&
|
|
|
+ String(sitem.has_account) === '0'
|
|
|
+ "
|
|
|
+ >
|
|
|
<exam-form
|
|
|
v-if="newTime"
|
|
|
:statusList="statusList"
|
|
@@ -170,11 +201,22 @@
|
|
|
@searchChange="examForm_supplier"
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
- <el-collapse-item title="供应商已驳回,待采购审核" name="5" v-if="isHasPermission({status:'8', process:'8'})">
|
|
|
+ <el-collapse-item
|
|
|
+ title="供应商已驳回,待采购审核"
|
|
|
+ name="5"
|
|
|
+ v-if="isHasPermission({ status: '8', process: '8' })"
|
|
|
+ >
|
|
|
<approval-results :sitem="sitem" @changeStatus="handlePurchaseExam" />
|
|
|
</el-collapse-item>
|
|
|
-
|
|
|
- <el-collapse-item title="业务公司修改,待供应商确认" name="6" v-if="isHasPermission({status:'10', process:'10'}) && String(sitem.has_account) === '0'">
|
|
|
+
|
|
|
+ <el-collapse-item
|
|
|
+ title="业务公司修改,待供应商确认"
|
|
|
+ name="6"
|
|
|
+ v-if="
|
|
|
+ isHasPermission({ status: '10', process: '10' }) &&
|
|
|
+ String(sitem.has_account) === '0'
|
|
|
+ "
|
|
|
+ >
|
|
|
<exam-form
|
|
|
v-if="newTime"
|
|
|
:statusList="statusList"
|
|
@@ -185,13 +227,17 @@
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
|
|
|
- <el-collapse-item title="待设置工单" name="7" v-if="isHasPermission({status:'11',process:'11'})">
|
|
|
- <set-work-order
|
|
|
- :sitem="sitem"
|
|
|
- :currentWorkOrder="currentWorkOrder"
|
|
|
- :workOrderCount="workOrderCount"
|
|
|
+ <el-collapse-item
|
|
|
+ title="待设置工单"
|
|
|
+ name="7"
|
|
|
+ v-if="isHasPermission({ status: '11', process: '11' })"
|
|
|
+ >
|
|
|
+ <set-work-order
|
|
|
+ :sitem="sitem"
|
|
|
+ :currentWorkOrder="currentWorkOrder"
|
|
|
+ :workOrderCount="workOrderCount"
|
|
|
:outItem="outItem"
|
|
|
- @reload="handleReload"
|
|
|
+ @reload="handleReload"
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
|
|
@@ -205,10 +251,9 @@
|
|
|
:iscgd="false"
|
|
|
/>
|
|
|
</el-collapse-item>
|
|
|
-
|
|
|
</el-collapse>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="审批记录" name="2">
|
|
|
+ <el-tab-pane label="审批记录" name="2">
|
|
|
<process-time-line
|
|
|
v-if="newTime !== ''"
|
|
|
:newTime="newTime"
|
|
@@ -222,9 +267,17 @@
|
|
|
</el-tab-pane> -->
|
|
|
|
|
|
<el-tab-pane label="流程图(按执行角色区分)" name="4">
|
|
|
- <img src="~@/assets/beforeSale.jpg" style="width:100%" />
|
|
|
+ <img src="~@/assets/beforeSale.jpg" style="width: 100%" />
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+ <open-msg
|
|
|
+ :num="10"
|
|
|
+ :title="'结算系统中已参与了业务,请解除后审批:'"
|
|
|
+ :show-model="showModel1"
|
|
|
+ :msg="msg"
|
|
|
+ @refresh="showModel1 = false"
|
|
|
+ @cancel="showModel1 = false"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<no-auth></no-auth>
|
|
@@ -239,9 +292,9 @@ import comExamForm from "./components/comExamForm";
|
|
|
import ApprovalResults from "./components/approval-results.vue";
|
|
|
import { showColumns } from "./components/ShowDataTableColumns";
|
|
|
import { xs_order_type_options } from "@/assets/js/statusList";
|
|
|
-import SetWorkOrder from "./components/set-work-order.vue"
|
|
|
+import SetWorkOrder from "./components/set-work-order.vue";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import ShowWorkOrder from "./components/show-work-order.vue"
|
|
|
+import ShowWorkOrder from "./components/show-work-order.vue";
|
|
|
import childList from "./components/child-list.vue";
|
|
|
export default {
|
|
|
name: "sellReturnDetail",
|
|
@@ -251,10 +304,10 @@ export default {
|
|
|
ApprovalResults,
|
|
|
SetWorkOrder,
|
|
|
ShowWorkOrder,
|
|
|
- childList
|
|
|
+ childList,
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['isSupertube']),
|
|
|
+ ...mapGetters(["isSupertube"]),
|
|
|
powers() {
|
|
|
const tran =
|
|
|
this.$store.getters.btnList.find(
|
|
@@ -272,25 +325,27 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ showModel1: false,
|
|
|
+ msg: "",
|
|
|
activeTabs: "1",
|
|
|
showColumns: showColumns,
|
|
|
- workOrderCount:"",
|
|
|
- currentWorkOrder:"",
|
|
|
+ workOrderCount: "",
|
|
|
+ currentWorkOrder: "",
|
|
|
outItem: {},
|
|
|
statusOptions: [
|
|
|
{ value: "1", label: "待业务审批" },
|
|
|
{ value: "4", label: "退货完成" },
|
|
|
{ value: "5", label: "业务驳回" },
|
|
|
- { value: '8', label:'供应商已驳回,待采购审核'},
|
|
|
- { value: '9', label:'待供应商审核'},
|
|
|
- { value: '10', label:'业务公司修改,待供应商确认'},
|
|
|
- { value: '11', label:'待设置工单'},
|
|
|
- { value: '12', label:'待库管收货'},
|
|
|
- { value: "13", label: "已取消申请" }
|
|
|
+ { value: "8", label: "供应商已驳回,待采购审核" },
|
|
|
+ { value: "9", label: "待供应商审核" },
|
|
|
+ { value: "10", label: "业务公司修改,待供应商确认" },
|
|
|
+ { value: "11", label: "待设置工单" },
|
|
|
+ { value: "12", label: "待库管收货" },
|
|
|
+ { value: "13", label: "已取消申请" },
|
|
|
],
|
|
|
xs_order_type_options,
|
|
|
sitem: null, //传给组件
|
|
|
- activeNames: ["0", "1", "2", "3", "4", "5", "6", "7","8",'10'],
|
|
|
+ activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "10"],
|
|
|
status: "", //存储详情接口状态
|
|
|
statusList: [
|
|
|
{
|
|
@@ -318,39 +373,88 @@ export default {
|
|
|
this.renderChart();
|
|
|
},
|
|
|
methods: {
|
|
|
- createNodes(){
|
|
|
- return [
|
|
|
- {"id":"0","text":"创建售前退货申请","type":"NormalTask","x":650,"y":100, "properties":{}},
|
|
|
- {"id":"1","text":"待业务审核","type":"NormalTask","x":650,"y":200,"properties":{}},
|
|
|
- {"id":"9","text":"待供应商审核","type":"NormalTask","x":650,"y":300,"properties":{}},
|
|
|
- {"id":"8","text":"供应商已驳回," + '\n' + "待采购审核","type":"NormalTask","x":650,"y":400,"properties":{}},
|
|
|
- {"id":"10","text":"业务公司修改," + '\n' + "待供应商确认","type":"NormalTask","x":650,"y":500,"properties":{}},
|
|
|
- {"id":"4","text":"完成退货","type":"NormalTask","x":650,"y":600,"properties":{}},
|
|
|
- {"id":"11","text":"待设置退货工单","type":"NormalTask","x":350,"y":400,"properties":{}},
|
|
|
- {"id":"12","text":"待库管收货","type":"NormalTask","x":350,"y":500,"properties":{}}
|
|
|
- ]
|
|
|
+ createNodes() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ id: "0",
|
|
|
+ text: "创建售前退货申请",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 650,
|
|
|
+ y: 100,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "1",
|
|
|
+ text: "待业务审核",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 650,
|
|
|
+ y: 200,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "9",
|
|
|
+ text: "待供应商审核",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 650,
|
|
|
+ y: 300,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "8",
|
|
|
+ text: "供应商已驳回," + "\n" + "待采购审核",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 650,
|
|
|
+ y: 400,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "10",
|
|
|
+ text: "业务公司修改," + "\n" + "待供应商确认",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 650,
|
|
|
+ y: 500,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ { id: "4", text: "完成退货", type: "NormalTask", x: 650, y: 600, properties: {} },
|
|
|
+ {
|
|
|
+ id: "11",
|
|
|
+ text: "待设置退货工单",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 350,
|
|
|
+ y: 400,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "12",
|
|
|
+ text: "待库管收货",
|
|
|
+ type: "NormalTask",
|
|
|
+ x: 350,
|
|
|
+ y: 500,
|
|
|
+ properties: {},
|
|
|
+ },
|
|
|
+ ];
|
|
|
},
|
|
|
- createEdges(){
|
|
|
- return [
|
|
|
- {"sourceNodeId":"0","targetNodeId":"1","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"1","targetNodeId":"9","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"9","targetNodeId":"8","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"8","targetNodeId":"11","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"11","targetNodeId":"12","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"10","targetNodeId":"4","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"8","targetNodeId":"10","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"10","targetNodeId":"8","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"11","targetNodeId":"12","isHitable":false,"type":"dashe-edge"},
|
|
|
- {"sourceNodeId":"12","targetNodeId":"4","isHitable":false,"type":"dashe-edge"},
|
|
|
- ]
|
|
|
+ createEdges() {
|
|
|
+ return [
|
|
|
+ { sourceNodeId: "0", targetNodeId: "1", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "1", targetNodeId: "9", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "9", targetNodeId: "8", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "8", targetNodeId: "11", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "11", targetNodeId: "12", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "10", targetNodeId: "4", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "8", targetNodeId: "10", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "10", targetNodeId: "8", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "11", targetNodeId: "12", isHitable: false, type: "dashe-edge" },
|
|
|
+ { sourceNodeId: "12", targetNodeId: "4", isHitable: false, type: "dashe-edge" },
|
|
|
+ ];
|
|
|
},
|
|
|
- renderChart(){
|
|
|
+ renderChart() {
|
|
|
this.$refs.flowChart.render({
|
|
|
nodes: this.createNodes(),
|
|
|
- edges: this.createEdges()
|
|
|
- })
|
|
|
+ edges: this.createEdges(),
|
|
|
+ });
|
|
|
},
|
|
|
- onGetSendInfoFirst(item){
|
|
|
+ onGetSendInfoFirst(item) {
|
|
|
this.outItem = item;
|
|
|
},
|
|
|
async statusConfirm(status, message, remark) {
|
|
@@ -366,10 +470,10 @@ export default {
|
|
|
console.log("取消");
|
|
|
});
|
|
|
},
|
|
|
- async handlePurchaseExam(data){
|
|
|
+ async handlePurchaseExam(data) {
|
|
|
let _model = {
|
|
|
returnCode: this.queryId,
|
|
|
- ...data
|
|
|
+ ...data,
|
|
|
};
|
|
|
|
|
|
let res = await asyncRequest.status(_model);
|
|
@@ -389,71 +493,78 @@ export default {
|
|
|
getNewTime() {
|
|
|
this.newTime = new Date().valueOf();
|
|
|
},
|
|
|
- async handleReload(){
|
|
|
- this.initData()
|
|
|
- /* 重新获取最第一条退货单 **/
|
|
|
- this.$refs.childListRef && this.$refs.childListRef.searchList()
|
|
|
- },
|
|
|
+ async handleReload() {
|
|
|
+ this.initData();
|
|
|
+ /* 重新获取最第一条退货单 **/
|
|
|
+ this.$refs.childListRef && this.$refs.childListRef.searchList();
|
|
|
+ },
|
|
|
//供应商确认
|
|
|
- async handleSupplierConfirm(e){
|
|
|
+ async handleSupplierConfirm(e) {
|
|
|
if (!this.loading) {
|
|
|
- let type = e.state + '' === "1" ? "4" : "8";
|
|
|
- let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
+ let type = e.state + "" === "1" ? "4" : "8";
|
|
|
+ let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
await this.statusConfirm(type, message, e.remark);
|
|
|
}
|
|
|
},
|
|
|
// 点击业务审核的保存按钮
|
|
|
async examForm(e) {
|
|
|
if (!this.loading) {
|
|
|
- let type = e.state + '' === "1" ? "9" : "5";
|
|
|
- let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
+ let type = e.state + "" === "1" ? "9" : "5";
|
|
|
+ let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
await this.statusConfirm(type, message, e.remark);
|
|
|
}
|
|
|
},
|
|
|
- async examForm_supplier(e){
|
|
|
+ async examForm_supplier(e) {
|
|
|
if (!this.loading) {
|
|
|
- let type = e.state + '' === "1" ? "4" : "8";
|
|
|
- let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
+ let type = e.state + "" === "1" ? "4" : "8";
|
|
|
+ let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
await this.statusConfirm(type, message, e.remark);
|
|
|
}
|
|
|
},
|
|
|
// 点击采购主管审核的保存按钮
|
|
|
async dirExamForm(e) {
|
|
|
if (!this.loading) {
|
|
|
- let type = e.state + '' === "1" ? "4" : "8";
|
|
|
- let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
+ let type = e.state + "" === "1" ? "4" : "8";
|
|
|
+ let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
|
|
|
await this.statusConfirm(type, message, e.remark);
|
|
|
}
|
|
|
},
|
|
|
- async setstatus(type, message, remark = "") {
|
|
|
+ async setstatus(type, msg, remark = "") {
|
|
|
let _model = {
|
|
|
returnCode: this.queryId,
|
|
|
status: type,
|
|
|
remark: remark,
|
|
|
};
|
|
|
- let res = await asyncRequest.status(_model);
|
|
|
- if (res && res.code === 0) {
|
|
|
+ const { code, data, message } = await asyncRequest.status(_model);
|
|
|
+ if (code === 0) {
|
|
|
this.$notify.success({
|
|
|
- title: message + "成功!",
|
|
|
+ title: msg + "成功!",
|
|
|
message: "",
|
|
|
});
|
|
|
await this.initData();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
+ } else if (code === 1005) {
|
|
|
+ this.msg = message;
|
|
|
+ this.showModel1 = true;
|
|
|
} else {
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- isHasPermission({status, process}){
|
|
|
- return this.sitem
|
|
|
- && String(this.sitem.status) === status
|
|
|
- && this.ppowers.includes(process)
|
|
|
- && !this.isSupertube
|
|
|
+ isHasPermission({ status, process }) {
|
|
|
+ return (
|
|
|
+ this.sitem &&
|
|
|
+ String(this.sitem.status) === status &&
|
|
|
+ this.ppowers.includes(process) &&
|
|
|
+ !this.isSupertube
|
|
|
+ );
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
async initData() {
|
|
|
- const { code, data, message } = await asyncRequest.detail({ returnCode: this.queryId });
|
|
|
+ const { code, data, message } = await asyncRequest.detail({
|
|
|
+ returnCode: this.queryId,
|
|
|
+ });
|
|
|
|
|
|
if (code === 0) {
|
|
|
const { is_stock, status } = data;
|