|
@@ -1,146 +1,69 @@
|
|
|
<template>
|
|
|
- <div class="zixunOrderDetail pagePadding">
|
|
|
+ <div class="zixunOrderDetail">
|
|
|
<div
|
|
|
- style="width: 100%"
|
|
|
- v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
|
|
|
+ class="zixunOrderDetail-main"
|
|
|
+ v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
|
|
|
>
|
|
|
- <p>{{ status }}---{{ powers }}</p>
|
|
|
-
|
|
|
- <div class="detail-page-title">
|
|
|
- <span>咨询售后申请编号:</span
|
|
|
- ><span v-if="sitem">{{ sitem.returnCode }}</span>
|
|
|
- </div>
|
|
|
- <status-bar
|
|
|
- v-if="newTime !== ''"
|
|
|
- :newTime="newTime"
|
|
|
- :options="statusOptions"
|
|
|
- :status="status"
|
|
|
- />
|
|
|
- <el-tabs v-model="activeTabs">
|
|
|
- <el-tab-pane label="业务详情" name="1">
|
|
|
- <el-collapse v-model="activeNames" style="margin:-18px 0 0 0">
|
|
|
- <el-collapse-item title="售后申请详情" name="1">
|
|
|
- <show-data-table
|
|
|
- :newTime="newTime"
|
|
|
+ <el-tabs v-model="projectTabs">
|
|
|
+ <el-tab-pane label="新建项目" name="0" v-if="queryType === 'add'">
|
|
|
+ <add-form
|
|
|
+ v-if="newTime !== ''"
|
|
|
+ :newTime="newTime"
|
|
|
+ :id="queryId"
|
|
|
+ :type="queryType"
|
|
|
+ :sitem="sitem"
|
|
|
+ @refresh="refresh"
|
|
|
+ />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="项目详情" name="1" v-if="queryType !== 'add'">
|
|
|
+ <el-collapse v-model="projectNames" style="margin: -18px 0 0 0">
|
|
|
+ <el-collapse-item title="项目详情" name="0">
|
|
|
+ <add-form
|
|
|
v-if="newTime !== ''"
|
|
|
+ :newTime="newTime"
|
|
|
+ :id="queryId"
|
|
|
+ :type="queryType"
|
|
|
:sitem="sitem"
|
|
|
- :columns="ShowDataTableColumns"
|
|
|
- >
|
|
|
- <template slot="status">
|
|
|
- <el-tag
|
|
|
- :size="'mini'"
|
|
|
- :type="sitem.status == '0' ? 'warning' : ''"
|
|
|
- v-text="
|
|
|
- (
|
|
|
- statusOptions.find(
|
|
|
- (item) => item.value == sitem.status
|
|
|
- ) || {}
|
|
|
- ).label || '--'
|
|
|
- "
|
|
|
- ></el-tag>
|
|
|
- </template>
|
|
|
- <template slot="order_type">
|
|
|
- <el-tag :size="'mini'" :type="''">{{
|
|
|
- sitem.status === "1"
|
|
|
- ? "销售出库单"
|
|
|
- : sitem.status === "2"
|
|
|
- ? "咨询出库单"
|
|
|
- : "--"
|
|
|
- }}</el-tag>
|
|
|
- </template>
|
|
|
- <template slot="except_code">
|
|
|
- <el-tag :size="'mini'" :type="''">{{
|
|
|
- sitem.except_code === "1"
|
|
|
- ? "退货"
|
|
|
- : sitem.except_code === "2"
|
|
|
- ? "换货"
|
|
|
- : sitem.except_code === "2"
|
|
|
- ? "改变售价"
|
|
|
- : "--"
|
|
|
- }}</el-tag>
|
|
|
- </template>
|
|
|
- </show-data-table>
|
|
|
- <!-- <add-edit-form
|
|
|
- :sitem="sitem"
|
|
|
- :newTime="newTime"
|
|
|
- v-if="newTime != ''"
|
|
|
- ></add-edit-form> -->
|
|
|
+ @refresh="refresh"
|
|
|
+ />
|
|
|
</el-collapse-item>
|
|
|
- <el-collapse-item
|
|
|
- title="业务审核"
|
|
|
- name="1"
|
|
|
- v-if="status == '0' && powers.some((item) => item == '043')"
|
|
|
- >
|
|
|
- <exam-form
|
|
|
- v-if="newTime != ''"
|
|
|
- :statusList="statusList"
|
|
|
+ <el-collapse-item title="设置项目毛利率" name="1">
|
|
|
+ <!-- <gross-form
|
|
|
+ v-if="newTime !== ''"
|
|
|
:newTime="newTime"
|
|
|
- :disabled="false"
|
|
|
- :isMust="false"
|
|
|
- @searchChange="examForm"
|
|
|
- />
|
|
|
+ :id="queryId"
|
|
|
+ :type="queryType"
|
|
|
+ :sitem="sitem"
|
|
|
+ @refresh="initForm()"
|
|
|
+ /> -->
|
|
|
</el-collapse-item>
|
|
|
<el-collapse-item
|
|
|
- title="供应商反馈"
|
|
|
+ title="采购部定价"
|
|
|
name="2"
|
|
|
- v-if="
|
|
|
- (status == '1' && powers.some((item) => item == '046')) ||
|
|
|
- status == '2' ||
|
|
|
- status == '3' ||
|
|
|
- status == '4' ||
|
|
|
- status == '5'
|
|
|
- "
|
|
|
+ v-if="status == '1' && powers.some((item) => item == '057')"
|
|
|
>
|
|
|
- <supplier-feedback
|
|
|
- v-if="newTime != ''"
|
|
|
- :sitem="sitem"
|
|
|
- :newTime="newTime"
|
|
|
- @refresh="initData()"
|
|
|
- />
|
|
|
+ 444
|
|
|
</el-collapse-item>
|
|
|
|
|
|
<el-collapse-item
|
|
|
- title="采购审核"
|
|
|
+ title="财务定价"
|
|
|
name="3"
|
|
|
- v-if="
|
|
|
- (status == '2' && powers.some((item) => item == '036')) ||
|
|
|
- status == '3' ||
|
|
|
- status == '4' ||
|
|
|
- status == '5'
|
|
|
- "
|
|
|
+ v-if="status == '2' && powers.some((item) => item == '058')"
|
|
|
>
|
|
|
- <purchase-check
|
|
|
- v-if="newTime != ''"
|
|
|
- :sitem="sitem"
|
|
|
- :newTime="newTime"
|
|
|
- @refresh="initData()"
|
|
|
- />
|
|
|
+ 555
|
|
|
</el-collapse-item>
|
|
|
+
|
|
|
<el-collapse-item
|
|
|
- title="填写物流"
|
|
|
+ title="财务审核定价"
|
|
|
name="4"
|
|
|
- v-if="
|
|
|
- (status == '3' && powers.some((item) => item == '045')) ||
|
|
|
- status == '4' ||
|
|
|
- status == '5'
|
|
|
- "
|
|
|
+ v-if="status == '3' && powers.some((item) => item == '059')"
|
|
|
>
|
|
|
- <return-express
|
|
|
- v-if="newTime != ''"
|
|
|
- :sitem="sitem"
|
|
|
- :newTime="newTime"
|
|
|
- @refresh="initData"
|
|
|
- ></return-express>
|
|
|
+ 666
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="审批记录" name="2">
|
|
|
- <process-time-line
|
|
|
- v-if="newTime !== ''"
|
|
|
- :newTime="newTime"
|
|
|
- :type="'ZXSHD'"
|
|
|
- :orderCode="orderCode"
|
|
|
- />
|
|
|
+ <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
|
|
|
+ 111
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
@@ -150,25 +73,26 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
+import asyncRequest from "@/apis/service/sheetOrder/project";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import asyncRequest from "@/apis/service/sheetOrder/zixunOrder";
|
|
|
-import addEditForm from "./components/addEditForm.vue";
|
|
|
-import supplierFeedback from "./components/supplier_feedback";
|
|
|
-
|
|
|
-import PurchaseCheck from "./components/purchase_check";
|
|
|
-import ReturnExpress from "./components/returnExpress";
|
|
|
-import ShowDataTableColumns from "./ShowDataTableColumns";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import addForm from "./components/addEditForm";
|
|
|
+// import grossForm from "./components/grossForm";
|
|
|
+// import financeExamOneForm from "./components/finance-exam-one-form";
|
|
|
+// import financeExamTwoForm from "./components/finance-exam-two-form";
|
|
|
+// import financeExamThreeForm from "./components/finance-exam-three-form";
|
|
|
export default {
|
|
|
name: "zixunOrderDetail",
|
|
|
- mixins: [mixinPage, resToken],
|
|
|
+ mixins: [resToken],
|
|
|
components: {
|
|
|
- addEditForm,
|
|
|
- PurchaseCheck,
|
|
|
- ReturnExpress,
|
|
|
- supplierFeedback,
|
|
|
+ addForm,
|
|
|
+ // grossForm,
|
|
|
+ // financeExamOneForm,
|
|
|
+ // financeExamTwoForm,
|
|
|
+ // financeExamThreeForm,
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
powers() {
|
|
|
let tran =
|
|
|
this.$store.getters.btnList.find(
|
|
@@ -181,98 +105,155 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
- activeNames: ["0", "1", "2", "3", "4", "10"],
|
|
|
- s_status: "", //存储详情接口状态
|
|
|
statusList: [],
|
|
|
- sitem: null,
|
|
|
+ size: "small",
|
|
|
+ projectTabs: "1",
|
|
|
+ projectNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
|
|
newTime: "",
|
|
|
loading: false,
|
|
|
- ShowDataTableColumns: ShowDataTableColumns,
|
|
|
- statusOptions: [
|
|
|
- { value: "0", label: "业务审核" },
|
|
|
- { value: "1", label: "物流信息反馈" },
|
|
|
- // { value: "2", label: "反馈物流费" },
|
|
|
- { value: "3", label: "填写退货信息" },
|
|
|
- // { value: "4", label: "已退货" },
|
|
|
- { value: "5", label: "售后退货单创建成功" },
|
|
|
- ],
|
|
|
- orderCode: "",
|
|
|
- return_code: "",
|
|
|
- code: "",
|
|
|
+ queryType: "",
|
|
|
+ queryId: "",
|
|
|
+ status: "",
|
|
|
+ sitem: null,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.code = this.$route.query.id;
|
|
|
-
|
|
|
- this.initData();
|
|
|
+ this.initForm();
|
|
|
},
|
|
|
methods: {
|
|
|
- getNewTime() {
|
|
|
- this.newTime = new Date().valueOf();
|
|
|
+ async initForm() {
|
|
|
+ const { id, type } = this.$route.query;
|
|
|
+ this.queryId = id;
|
|
|
+ this.queryType = type;
|
|
|
+ this.projectTabs = type === "add" ? "0" : "1";
|
|
|
+ this.loading = true;
|
|
|
+ if (this.queryType === "add") {
|
|
|
+ this.sitem = {};
|
|
|
+ this.getNewTime();
|
|
|
+ } else {
|
|
|
+ await this.initData();
|
|
|
+ }
|
|
|
+
|
|
|
+ this.loading = false;
|
|
|
},
|
|
|
// 点击业务审核的保存按钮
|
|
|
+
|
|
|
async examForm(e) {
|
|
|
console.log(e);
|
|
|
if (!this.loading) {
|
|
|
- let type = e.state === "1" ? "1" : "0";
|
|
|
- console.log(type);
|
|
|
- await this.setstatus(type, "提交业务审核", e.remark);
|
|
|
+ let model = {
|
|
|
+ activity_code: this.queryId,
|
|
|
+ status: e.state === "1" ? "1" : "8",
|
|
|
+ remark: e.remark,
|
|
|
+ };
|
|
|
+ await this.setstatus("提交产品部门审核", model);
|
|
|
}
|
|
|
},
|
|
|
- //
|
|
|
- async setstatus(type, detail, remark) {
|
|
|
- await this.$confirm(`确定要${type === "1" ? "同意" : "驳回"}?`, {
|
|
|
+ async setstatus(detail, model) {
|
|
|
+ await this.$confirm(`确定要${detail}?`, {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(async () => {
|
|
|
- // if (this.sitem) {
|
|
|
- // let { returnCode } = this.sitem;
|
|
|
- const model = {
|
|
|
- remark,
|
|
|
- returnCode: this.code,
|
|
|
- status: type,
|
|
|
- };
|
|
|
- let res = await asyncRequest.status(model);
|
|
|
-
|
|
|
+ let res = await asyncRequest.actstatus(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.$notify.success({
|
|
|
- title: "修改成功!",
|
|
|
+ title: "提交成功!",
|
|
|
message: "",
|
|
|
});
|
|
|
- await this.initData();
|
|
|
+ await this.initForm();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.$message.warning(res.message);
|
|
|
}
|
|
|
- // }
|
|
|
})
|
|
|
.catch(() => {
|
|
|
console.log("取消");
|
|
|
});
|
|
|
},
|
|
|
- async initData() {
|
|
|
+ handleClick(row) {
|
|
|
+ console.log(row);
|
|
|
+ },
|
|
|
+ async refresh(e) {
|
|
|
+ const { projectNo } = e;
|
|
|
let model = {
|
|
|
- returnCode: this.code,
|
|
|
+ id: this.queryType === "add" ? projectNo : this.queryId,
|
|
|
+ type: "view",
|
|
|
};
|
|
|
- const res = await asyncRequest.detail(model);
|
|
|
- if (res && res.code === 0 && res.data) {
|
|
|
- this.status = res.data.status;
|
|
|
- this.sitem = res.data;
|
|
|
- this.orderCode = res.data.returnCode;
|
|
|
+ this.routeReGoto("zixunOrderDetail", model);
|
|
|
+ await this.initForm();
|
|
|
+ },
|
|
|
+ async initData() {
|
|
|
+ this.loading = true;
|
|
|
+ const { code, message, data } = await asyncRequest.detail({
|
|
|
+ projectNo: this.queryId,
|
|
|
+ });
|
|
|
+ this.loading = false;
|
|
|
+ console.log(data);
|
|
|
+ if (code === 0) {
|
|
|
+ this.sitem = JSON.parse(JSON.stringify(data));
|
|
|
+ const { status } = this.sitem;
|
|
|
+ this.status = status;
|
|
|
this.getNewTime();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
},
|
|
|
+ getNewTime() {
|
|
|
+ this.newTime = new Date().valueOf();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
+ <style lang="scss" scoped>
|
|
|
+.zixunOrderDetail {
|
|
|
+ position: relative;
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .zixunOrderDetail-main {
|
|
|
+ overflow-y: scroll;
|
|
|
+ position: relative;
|
|
|
+ padding: 10px;
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .zixunOrderDetail-title {
|
|
|
+ border-top: 1px solid #ebeef5;
|
|
|
+ span {
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ font-family: "微软雅黑", sans-serif;
|
|
|
+ font-weight: 400;
|
|
|
+ font-style: normal;
|
|
|
+ font-size: 16fpx;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/ .ddiv {
|
|
|
+ border-top: 1px solid #dcdfe6;
|
|
|
+ }
|
|
|
+ /deep/ .dtitle {
|
|
|
+ width: 40px;
|
|
|
+ text-align: center;
|
|
|
+ height: 100%;
|
|
|
+ min-height: 100%;
|
|
|
+ ul {
|
|
|
+ padding: 12px 0 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/ .dmain {
|
|
|
+ padding: 20px 0 0 0;
|
|
|
+ width: calc(100% - 40px);
|
|
|
+ border-left: 1px solid #dcdfe6;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
|