123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <template>
- <div class="purchaseOrderDetail pagePadding">
- <div
- style="width: 100%"
- v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
- >
- <div class="tr" style="height: 50px; padding: 10px 0 0 0">
- <el-button
- class="fr"
- type="primary"
- plain
- :size="'mini'"
- style="margin: 0 0 0 10px"
- @click="showModel = true"
- >新建售后申请单
- </el-button>
- </div>
- <status-bar
- v-if="newTime !== ''"
- :newTime="newTime"
- :options="statusOptions"
- :status="status"
- />
- <el-collapse v-model="activeNames">
- <el-collapse-item title="咨询出库单详情" name="1">
- <add-edit-form
- :sitem="sitem"
- :newTime="newTime"
- v-if="newTime != ''"
- ></add-edit-form>
- </el-collapse-item>
- <el-collapse-item title="填写物流" name="2">
- <logistics-form
- :sitem="sitem"
- :newTime="newTime"
- v-if="newTime != ''"
- @refresh="initData()"
- />
- </el-collapse-item>
- <el-collapse-item title="客户验收" name="3">
- <div class="tr" style="padding: 0 20px 20px 0">
- <el-button
- type="primary"
- plain
- :size="'mini'"
- @click="customerCheck"
- >客户已收到货</el-button
- >
- </div>
- </el-collapse-item>
- <el-collapse-item title="审批记录" name="10">
- <process-time-line
- v-if="newTime !== ''"
- :newTime="newTime"
- :type="'SHD'"
- :orderCode="orderCode"
- />
- </el-collapse-item>
- </el-collapse>
- <div>
- <add-Edit-A
- :id="'add'"
- :sitem="sitem"
- :show-model="showModel"
- :is-detail="false"
- @refresh="initData"
- @cancel="showModel = false"
- />
- </div>
- </div>
- <div v-else>
- <no-auth></no-auth>
- </div>
- </div>
- </template>
- <script>
- import mixinPage from "@/mixins/elPaginationHandle";
- import resToken from "@/mixins/resToken";
- import asyncRequest from "@/apis/service/sheetOrder/zxoutOrder";
- import addEditForm from "./components/addEditForm.vue";
- import logisticsForm from "./components/logisticsForm";
- import addEditA from "./components/addEditA";
- export default {
- name: "zxoutOrderDetail",
- mixins: [mixinPage, resToken],
- components: {
- addEditForm,
- addEditA,
- logisticsForm,
- },
- computed: {
- powers() {
- let tran =
- this.$store.getters.btnList.find(
- (item) => item.menu_route == "zxoutOrderDetail"
- ) || {};
- if (tran && tran.action && tran.action.length > 0) {
- return tran.action;
- } else {
- return [];
- }
- },
- },
- data() {
- return {
- activeNames: ["0", "1", "2", "3", "4", "10"],
- status: "", //存储详情接口状态
- statusList: [],
- sitem: null,
- newTime: "",
- showModel: false,
- loading: false,
- statusOptions: [
- { value: "0", label: "待发货" },
- { value: "1", label: "待验收" },
- { value: "2", label: "已完成" },
- // { value: "3", label: "已完成" },
- ],
- code: "",
- };
- },
- mounted() {
- this.code = this.$route.query.id;
- console.log(this.code);
- this.initData();
- },
- methods: {
- getNewTime() {
- this.newTime = new Date().valueOf();
- },
- async setstatus() {
- const model = {
- orderCode: "",
- status: "",
- outCode: this.code,
- };
- let res = await asyncRequest.status(model);
- if (res && res.code === 0) {
- this.$notify.success({
- title: "修改成功!",
- message: "",
- });
- await this.initData();
- } else if (res && res.code >= 100 && res.code <= 104) {
- await this.logout();
- } else {
- this.$message.warning(res.message);
- }
- },
- async initData() {
- let model = {
- outCode: this.code,
- };
- const res = await asyncRequest.detail(model);
- if (res && res.code === 0 && res.data) {
- this.sitem = res.data;
- const { can } = this.sitem;
- this.sitem.class_cat = "";
- if (can && can.length > 0) {
- can.forEach((x, i) => {
- this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
- });
- }
- const { status } = res.data;
- this.status = status;
- this.getNewTime();
- } else if (res && res.code >= 100 && res.code <= 104) {
- await this.logout();
- } else {
- this.$message.warning(res.message);
- }
- },
- async customerCheck() {
- let model = {
- outCode: this.code,
- orderCode: this.sitem.orderCode,
- status: "3",
- };
- const res = await asyncRequest.status(model);
- if (res && res.code === 0) {
- await this.initData();
- } else if (res && res.code >= 100 && res.code <= 104) {
- await this.logout();
- } else {
- this.$message.warning(res.message);
- }
- },
- },
- };
- </script>
-
-
|