Merge branch 'fengcang' into busUser
# Conflicts: # public/config.json # src/views/basic/BasicEntrutsRece.vue # src/views/business/stockOrder.vue # src/views/business/stockOrderDelSearch.vue # src/views/business/stockOrderEditor.vue # src/views/business/stockOrderNew.vue # src/views/business/stockOrderNewDistribution.vue # src/views/business/stockOrderSearch.vue # src/views/business/stockOrderWaitCheck.vue # src/views/inout/IOAddOrder.vue # src/views/inout/IOCheckWaitOrder.vue # src/views/inout/IOFinishOrder.vuepurchase
						commit
						ea7d03a753
					
				@ -1,360 +1,358 @@
 | 
				
			||||
<template>
 | 
				
			||||
  <div>
 | 
				
			||||
    <el-card>
 | 
				
			||||
      <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
 | 
				
			||||
        <el-form-item class="query-form-item">
 | 
				
			||||
          <el-input
 | 
				
			||||
              v-model="filterQuery.name"
 | 
				
			||||
              style="width: 250px"
 | 
				
			||||
              placeholder="单据类型名称"
 | 
				
			||||
          ></el-input>
 | 
				
			||||
        </el-form-item>
 | 
				
			||||
        <el-form-item>
 | 
				
			||||
          <el-button-group style="margin-left: 10px;display:flex;">
 | 
				
			||||
            <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
 | 
				
			||||
            <el-button type="primary" icon="search" @click="search">查询</el-button>
 | 
				
			||||
            <el-button type="primary" icon="search" @click="handleAddClick"
 | 
				
			||||
                       :disabled="!configParms.entrustAction"
 | 
				
			||||
            >新增
 | 
				
			||||
            </el-button
 | 
				
			||||
            >
 | 
				
			||||
          </el-button-group>
 | 
				
			||||
    <div>
 | 
				
			||||
        <el-card>
 | 
				
			||||
            <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
 | 
				
			||||
                <el-form-item class="query-form-item">
 | 
				
			||||
                    <el-input
 | 
				
			||||
                        v-model="filterQuery.name"
 | 
				
			||||
                        style="width: 250px"
 | 
				
			||||
                        placeholder="单据类型名称"
 | 
				
			||||
                    ></el-input>
 | 
				
			||||
                </el-form-item>
 | 
				
			||||
                <el-form-item>
 | 
				
			||||
                    <el-button-group style="margin-left: 10px;display:flex;">
 | 
				
			||||
                        <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
 | 
				
			||||
                        <el-button type="primary" icon="search" @click="search">查询</el-button>
 | 
				
			||||
                        <el-button type="primary" icon="search" @click="handleAddClick"
 | 
				
			||||
                                   :disabled="!configParms.entrustAction"
 | 
				
			||||
                        >新增
 | 
				
			||||
                        </el-button
 | 
				
			||||
                        >
 | 
				
			||||
                    </el-button-group>
 | 
				
			||||
 | 
				
			||||
        </el-form-item>
 | 
				
			||||
      </el-form>
 | 
				
			||||
                </el-form-item>
 | 
				
			||||
            </el-form>
 | 
				
			||||
 | 
				
			||||
      <el-table v-loading="loading" :data="list" style="width: 100%">
 | 
				
			||||
        <el-table-column label="序号" type="index" width="60" fixed></el-table-column>
 | 
				
			||||
        <el-table-column label="扫码单据类型" prop="curName" fixed></el-table-column>
 | 
				
			||||
        <el-table-column label="当前仓库" prop="curInvName" fixed></el-table-column>
 | 
				
			||||
        <el-table-column label="当前分库" prop="invWarehouseName" fixed></el-table-column>
 | 
				
			||||
        <el-table-column label="委托验收仓库" prop="entrustInvName" fixed></el-table-column>
 | 
				
			||||
        <el-table-column label="委托验收分库" prop="entrustSubInvName" fixed></el-table-column>
 | 
				
			||||
        <el-table-column label="委托验收人" prop="employeeName" fixed>
 | 
				
			||||
        </el-table-column>
 | 
				
			||||
        <el-table-column label="操作" fixed="right">
 | 
				
			||||
          <template slot-scope="scope">
 | 
				
			||||
            <el-button
 | 
				
			||||
                type="text"
 | 
				
			||||
                size="small"
 | 
				
			||||
                @click.native.stop="handleModifyClick(scope.row)"
 | 
				
			||||
                :disabled="!configParms.entrustAction"
 | 
				
			||||
            >编辑
 | 
				
			||||
            </el-button
 | 
				
			||||
            >
 | 
				
			||||
            <el-button
 | 
				
			||||
                type="text"
 | 
				
			||||
                size="small"
 | 
				
			||||
                @click.native.stop="deleteDialog(scope.row)"
 | 
				
			||||
                :disabled="!configParms.entrustAction"
 | 
				
			||||
            >删除
 | 
				
			||||
            </el-button
 | 
				
			||||
            >
 | 
				
			||||
          </template>
 | 
				
			||||
            <el-table v-loading="loading" :data="list" style="width: 100%">
 | 
				
			||||
                <el-table-column label="序号" type="index" width="60" fixed></el-table-column>
 | 
				
			||||
                <el-table-column label="扫码单据类型" prop="curName" fixed></el-table-column>
 | 
				
			||||
                <el-table-column label="当前仓库" prop="curInvName" fixed></el-table-column>
 | 
				
			||||
                <el-table-column label="当前分库" prop="invWarehouseName" fixed></el-table-column>
 | 
				
			||||
                <el-table-column label="委托验收仓库" prop="entrustInvName" fixed></el-table-column>
 | 
				
			||||
                <el-table-column label="委托验收分库" prop="entrustSubInvName" fixed></el-table-column>
 | 
				
			||||
                <el-table-column label="委托验收人" prop="employeeName" fixed>
 | 
				
			||||
                </el-table-column>
 | 
				
			||||
                <el-table-column label="操作" fixed="right">
 | 
				
			||||
                    <template slot-scope="scope">
 | 
				
			||||
                        <el-button
 | 
				
			||||
                            type="text"
 | 
				
			||||
                            size="small"
 | 
				
			||||
                            @click.native.stop="handleModifyClick(scope.row)"
 | 
				
			||||
                            :disabled="!configParms.entrustAction"
 | 
				
			||||
                        >编辑
 | 
				
			||||
                        </el-button
 | 
				
			||||
                        >
 | 
				
			||||
                        <el-button
 | 
				
			||||
                            type="text"
 | 
				
			||||
                            size="small"
 | 
				
			||||
                            @click.native.stop="deleteDialog(scope.row)"
 | 
				
			||||
                            :disabled="!configParms.entrustAction"
 | 
				
			||||
                        >删除
 | 
				
			||||
                        </el-button
 | 
				
			||||
                        >
 | 
				
			||||
                    </template>
 | 
				
			||||
 | 
				
			||||
        </el-table-column>
 | 
				
			||||
      </el-table>
 | 
				
			||||
                </el-table-column>
 | 
				
			||||
            </el-table>
 | 
				
			||||
 | 
				
			||||
      <el-dialog
 | 
				
			||||
          title="新增委托验收"
 | 
				
			||||
          :visible.sync="addDialogVisible"
 | 
				
			||||
          width="70%"
 | 
				
			||||
          :close-on-click-modal="false"
 | 
				
			||||
          :close-on-press-escape="false"
 | 
				
			||||
          v-if="addDialogVisible"
 | 
				
			||||
      >
 | 
				
			||||
        <modifyDialog :inputQuery="inputQuery"></modifyDialog>
 | 
				
			||||
        <div style="text-align: center">
 | 
				
			||||
          <el-button type="primary" size="small" icon="search" @click="onAddSubmit"
 | 
				
			||||
          >提交
 | 
				
			||||
          </el-button
 | 
				
			||||
          >
 | 
				
			||||
          <el-button type="primary" size="small" icon="search" @click="cancelDialog"
 | 
				
			||||
          >取消
 | 
				
			||||
          </el-button
 | 
				
			||||
          >
 | 
				
			||||
        </div>
 | 
				
			||||
      </el-dialog>
 | 
				
			||||
            <el-dialog
 | 
				
			||||
                title="新增委托验收"
 | 
				
			||||
                :visible.sync="addDialogVisible"
 | 
				
			||||
                width="70%"
 | 
				
			||||
                :close-on-click-modal="false"
 | 
				
			||||
                :close-on-press-escape="false"
 | 
				
			||||
                v-if="addDialogVisible"
 | 
				
			||||
            >
 | 
				
			||||
                <modifyDialog :inputQuery="inputQuery"></modifyDialog>
 | 
				
			||||
                <div style="text-align: center">
 | 
				
			||||
                    <el-button type="primary" size="small" icon="search" @click="onAddSubmit"
 | 
				
			||||
                    >提交
 | 
				
			||||
                    </el-button
 | 
				
			||||
                    >
 | 
				
			||||
                    <el-button type="primary" size="small" icon="search" @click="cancelDialog"
 | 
				
			||||
                    >取消
 | 
				
			||||
                    </el-button
 | 
				
			||||
                    >
 | 
				
			||||
                </div>
 | 
				
			||||
            </el-dialog>
 | 
				
			||||
 | 
				
			||||
      <el-dialog
 | 
				
			||||
          title="编辑委托验收"
 | 
				
			||||
          :visible.sync="modifyDialogVisible"
 | 
				
			||||
          width="70%"
 | 
				
			||||
          :close-on-click-modal="false"
 | 
				
			||||
          :close-on-press-escape="false"
 | 
				
			||||
          v-if="modifyDialogVisible"
 | 
				
			||||
      >
 | 
				
			||||
        <modifyDialog :inputQuery="inputQuery"></modifyDialog>
 | 
				
			||||
        <div style="text-align: center">
 | 
				
			||||
          <el-button type="primary" size="small" icon="search" @click="onModifySubmit"
 | 
				
			||||
          >提交
 | 
				
			||||
          </el-button
 | 
				
			||||
          >
 | 
				
			||||
          <el-button type="primary" size="small" icon="search" @click="cancelDialog"
 | 
				
			||||
          >取消
 | 
				
			||||
          </el-button
 | 
				
			||||
          >
 | 
				
			||||
        </div>
 | 
				
			||||
      </el-dialog>
 | 
				
			||||
      <el-pagination
 | 
				
			||||
          :page-size="filterQuery.limit"
 | 
				
			||||
          @current-change="handleCurrentChange"
 | 
				
			||||
          layout="prev, pager, next"
 | 
				
			||||
          :total="total"
 | 
				
			||||
          :current-page="filterQuery.page"
 | 
				
			||||
      ></el-pagination>
 | 
				
			||||
    </el-card>
 | 
				
			||||
  </div>
 | 
				
			||||
            <el-dialog
 | 
				
			||||
                title="编辑委托验收"
 | 
				
			||||
                :visible.sync="modifyDialogVisible"
 | 
				
			||||
                width="70%"
 | 
				
			||||
                :close-on-click-modal="false"
 | 
				
			||||
                :close-on-press-escape="false"
 | 
				
			||||
                v-if="modifyDialogVisible"
 | 
				
			||||
            >
 | 
				
			||||
                <modifyDialog :inputQuery="inputQuery"></modifyDialog>
 | 
				
			||||
                <div style="text-align: center">
 | 
				
			||||
                    <el-button type="primary" size="small" icon="search" @click="onModifySubmit"
 | 
				
			||||
                    >提交
 | 
				
			||||
                    </el-button
 | 
				
			||||
                    >
 | 
				
			||||
                    <el-button type="primary" size="small" icon="search" @click="cancelDialog"
 | 
				
			||||
                    >取消
 | 
				
			||||
                    </el-button
 | 
				
			||||
                    >
 | 
				
			||||
                </div>
 | 
				
			||||
            </el-dialog>
 | 
				
			||||
            <el-pagination
 | 
				
			||||
                :page-size="filterQuery.limit"
 | 
				
			||||
                @current-change="handleCurrentChange"
 | 
				
			||||
                layout="prev, pager, next"
 | 
				
			||||
                :total="total"
 | 
				
			||||
                :current-page="filterQuery.page"
 | 
				
			||||
            ></el-pagination>
 | 
				
			||||
        </el-card>
 | 
				
			||||
    </div>
 | 
				
			||||
</template>
 | 
				
			||||
<script>
 | 
				
			||||
import {
 | 
				
			||||
  getEntrustRece,
 | 
				
			||||
  deleteEntrustRece,
 | 
				
			||||
  updateEntrustRece,
 | 
				
			||||
  insertEntrustRece,
 | 
				
			||||
    getEntrustRece,
 | 
				
			||||
    deleteEntrustRece,
 | 
				
			||||
    updateEntrustRece,
 | 
				
			||||
    insertEntrustRece,
 | 
				
			||||
} from "../../api/basic/EntrustRece";
 | 
				
			||||
 | 
				
			||||
import modifyDialog from "./BasicEntrutsReceModify";
 | 
				
			||||
import {findConfig} from "@/api/thrsys/spsSyncStatus";
 | 
				
			||||
 | 
				
			||||
export default {
 | 
				
			||||
  data() {
 | 
				
			||||
    return {
 | 
				
			||||
      filterQuery: {
 | 
				
			||||
        name: "",
 | 
				
			||||
        page: 1,
 | 
				
			||||
        limit: 20,
 | 
				
			||||
      },
 | 
				
			||||
      loading: false,
 | 
				
			||||
      addDialogVisible: false,
 | 
				
			||||
      modifyDialogVisible: false,
 | 
				
			||||
      list: [],
 | 
				
			||||
      inputQuery: {
 | 
				
			||||
        action: "",
 | 
				
			||||
        name: "",
 | 
				
			||||
        entrustInv: "",
 | 
				
			||||
        entrustUser: "",
 | 
				
			||||
        entrustAction: null,
 | 
				
			||||
        finishRece: false,
 | 
				
			||||
        curInv: "",
 | 
				
			||||
        entrustSubInv: "",
 | 
				
			||||
        invWarehouseCode: "",
 | 
				
			||||
      },
 | 
				
			||||
      enableMap: {
 | 
				
			||||
        true: "是",
 | 
				
			||||
        false: "否",
 | 
				
			||||
      },
 | 
				
			||||
      mainActionMap: {
 | 
				
			||||
        WareHouseIn: "入库",
 | 
				
			||||
        WareHouseOut: "出库"
 | 
				
			||||
      },
 | 
				
			||||
      fileList: [],
 | 
				
			||||
      total: 0,
 | 
				
			||||
      multipleSelection: [],
 | 
				
			||||
      uploadFileUrl: null,
 | 
				
			||||
      headers: {},
 | 
				
			||||
      configParms: {},
 | 
				
			||||
    data() {
 | 
				
			||||
        return {
 | 
				
			||||
            filterQuery: {
 | 
				
			||||
                name: "",
 | 
				
			||||
                page: 1,
 | 
				
			||||
                limit: 20,
 | 
				
			||||
            },
 | 
				
			||||
            loading: false,
 | 
				
			||||
            addDialogVisible: false,
 | 
				
			||||
            modifyDialogVisible: false,
 | 
				
			||||
            list: [],
 | 
				
			||||
            inputQuery: {
 | 
				
			||||
                action: "",
 | 
				
			||||
                name: "",
 | 
				
			||||
                entrustInv: "",
 | 
				
			||||
                entrustUser: "",
 | 
				
			||||
                entrustAction: null,
 | 
				
			||||
                finishRece: false,
 | 
				
			||||
                curInv: "",
 | 
				
			||||
                entrustSubInv: "",
 | 
				
			||||
                invWarehouseCode: "",
 | 
				
			||||
            },
 | 
				
			||||
            enableMap: {
 | 
				
			||||
                true: "是",
 | 
				
			||||
                false: "否",
 | 
				
			||||
            },
 | 
				
			||||
            mainActionMap: {
 | 
				
			||||
                WareHouseIn: "入库",
 | 
				
			||||
                WareHouseOut: "出库"
 | 
				
			||||
            },
 | 
				
			||||
            fileList: [],
 | 
				
			||||
            total: 0,
 | 
				
			||||
            multipleSelection: [],
 | 
				
			||||
            uploadFileUrl: null,
 | 
				
			||||
            headers: {},
 | 
				
			||||
            configParms: {},
 | 
				
			||||
 | 
				
			||||
    };
 | 
				
			||||
  },
 | 
				
			||||
 | 
				
			||||
  methods: {
 | 
				
			||||
    onReset() {
 | 
				
			||||
      this.$router.push({
 | 
				
			||||
        path: "",
 | 
				
			||||
      });
 | 
				
			||||
      this.filterQuery = {
 | 
				
			||||
        name: "",
 | 
				
			||||
        page: 1,
 | 
				
			||||
        limit: 20,
 | 
				
			||||
      };
 | 
				
			||||
      this.getList();
 | 
				
			||||
    },
 | 
				
			||||
    cancelDialog() {
 | 
				
			||||
      this.modifyDialogVisible = false;
 | 
				
			||||
      this.addDialogVisible = false;
 | 
				
			||||
    },
 | 
				
			||||
    handleCurrentChange(val) {
 | 
				
			||||
      this.filterQuery.page = val;
 | 
				
			||||
      this.getList();
 | 
				
			||||
    },
 | 
				
			||||
    search() {
 | 
				
			||||
      this.filterQuery.page = 1;
 | 
				
			||||
      this.getList();
 | 
				
			||||
    },
 | 
				
			||||
    getList() {
 | 
				
			||||
      this.loading = true;
 | 
				
			||||
      getEntrustRece(this.filterQuery)
 | 
				
			||||
          .then((response) => {
 | 
				
			||||
            this.loading = false;
 | 
				
			||||
            this.list = response.data.list || [];
 | 
				
			||||
            this.total = response.data.total || 0;
 | 
				
			||||
          })
 | 
				
			||||
          .catch(() => {
 | 
				
			||||
            this.loading = false;
 | 
				
			||||
            this.list = [];
 | 
				
			||||
            this.total = 0;
 | 
				
			||||
          });
 | 
				
			||||
        };
 | 
				
			||||
    },
 | 
				
			||||
 | 
				
			||||
    methods: {
 | 
				
			||||
        onReset() {
 | 
				
			||||
            this.$router.push({
 | 
				
			||||
                path: "",
 | 
				
			||||
            });
 | 
				
			||||
            this.filterQuery = {
 | 
				
			||||
                name: "",
 | 
				
			||||
                page: 1,
 | 
				
			||||
                limit: 20,
 | 
				
			||||
            };
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        cancelDialog() {
 | 
				
			||||
            this.modifyDialogVisible = false;
 | 
				
			||||
            this.addDialogVisible = false;
 | 
				
			||||
        },
 | 
				
			||||
        handleCurrentChange(val) {
 | 
				
			||||
            this.filterQuery.page = val;
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        search() {
 | 
				
			||||
            this.filterQuery.page = 1;
 | 
				
			||||
            this.getList();
 | 
				
			||||
        },
 | 
				
			||||
        getList() {
 | 
				
			||||
            this.loading = true;
 | 
				
			||||
            getEntrustRece(this.filterQuery)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.list = response.data.list || [];
 | 
				
			||||
                    this.total = response.data.total || 0;
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.list = [];
 | 
				
			||||
                    this.total = 0;
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
    onAddSubmit() {
 | 
				
			||||
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.action)) {
 | 
				
			||||
        this.$message.error("单据类型不能为空!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.curInv)) {
 | 
				
			||||
        this.$message.error("请输入委托仓库!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustInv)) {
 | 
				
			||||
        this.$message.error("请输入接受委托仓库!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustUser)) {
 | 
				
			||||
        this.$message.error("请输入接受委托人!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
        onAddSubmit() {
 | 
				
			||||
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.invWarehouseCode)) {
 | 
				
			||||
        this.$message.error("当前分库不能为空!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustSubInv)) {
 | 
				
			||||
        this.$message.error("请输入接受委托分库!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.action)) {
 | 
				
			||||
                this.$message.error("单据类型不能为空!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.curInv)) {
 | 
				
			||||
                this.$message.error("请输入委托仓库!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustInv)) {
 | 
				
			||||
                this.$message.error("请输入接受委托仓库!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustUser)) {
 | 
				
			||||
                this.$message.error("请输入接受委托人!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustAction)) {
 | 
				
			||||
        this.$message.error("请输入生成单据类型!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.invWarehouseCode)) {
 | 
				
			||||
                this.$message.error("当前分库不能为空!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustSubInv)) {
 | 
				
			||||
                this.$message.error("请输入接受委托分库!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
 | 
				
			||||
      insertEntrustRece(this.inputQuery)
 | 
				
			||||
          .then((response) => {
 | 
				
			||||
            if (response.code == 20000) {
 | 
				
			||||
              this.loading = false;
 | 
				
			||||
              this.cancelDialog();
 | 
				
			||||
              this.getList();
 | 
				
			||||
            } else {
 | 
				
			||||
              this.$message.error(response.message);
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustAction)) {
 | 
				
			||||
                this.$message.error("请输入生成单据类型!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
          })
 | 
				
			||||
          .catch(() => {
 | 
				
			||||
            this.loading = false;
 | 
				
			||||
            this.cancelDialog();
 | 
				
			||||
          });
 | 
				
			||||
    },
 | 
				
			||||
 | 
				
			||||
    onModifySubmit() {
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.action)) {
 | 
				
			||||
        this.$message.error("单据类型不能为空!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.curInv)) {
 | 
				
			||||
        this.$message.error("请输入委托仓库!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustInv)) {
 | 
				
			||||
        this.$message.error("请输入接受委托仓库!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustUser)) {
 | 
				
			||||
        this.$message.error("请输入接受委托人!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
            insertEntrustRece(this.inputQuery)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    if (response.code == 20000) {
 | 
				
			||||
                        this.loading = false;
 | 
				
			||||
                        this.cancelDialog();
 | 
				
			||||
                        this.getList();
 | 
				
			||||
                    } else {
 | 
				
			||||
                        this.$message.error(response.message);
 | 
				
			||||
                    }
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.cancelDialog();
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.invWarehouseCode)) {
 | 
				
			||||
        this.$message.error("当前分库不能为空!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustSubInv)) {
 | 
				
			||||
        this.$message.error("请输入接受委托分库!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
        onModifySubmit() {
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.action)) {
 | 
				
			||||
                this.$message.error("单据类型不能为空!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.curInv)) {
 | 
				
			||||
                this.$message.error("请输入委托仓库!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustInv)) {
 | 
				
			||||
                this.$message.error("请输入接受委托仓库!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustUser)) {
 | 
				
			||||
                this.$message.error("请输入接受委托人!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
 | 
				
			||||
      if (this.$isBlank(this.inputQuery.entrustAction)) {
 | 
				
			||||
        this.$message.error("请输入生成单据类型!");
 | 
				
			||||
        return;
 | 
				
			||||
      }
 | 
				
			||||
      updateEntrustRece(this.inputQuery)
 | 
				
			||||
          .then((response) => {
 | 
				
			||||
            this.loading = false;
 | 
				
			||||
            this.cancelDialog();
 | 
				
			||||
            this.getList();
 | 
				
			||||
          })
 | 
				
			||||
          .catch(() => {
 | 
				
			||||
            this.loading = false;
 | 
				
			||||
            this.cancelDialog();
 | 
				
			||||
          });
 | 
				
			||||
    },
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.invWarehouseCode)) {
 | 
				
			||||
                this.$message.error("当前分库不能为空!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustSubInv)) {
 | 
				
			||||
                this.$message.error("请输入接受委托分库!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
 | 
				
			||||
    handleAddClick() {
 | 
				
			||||
      this.inputQuery = {enable: true, expireTip: true};
 | 
				
			||||
      this.addDialogVisible = true;
 | 
				
			||||
    },
 | 
				
			||||
            if (this.$isBlank(this.inputQuery.entrustAction)) {
 | 
				
			||||
                this.$message.error("请输入生成单据类型!");
 | 
				
			||||
                return;
 | 
				
			||||
            }
 | 
				
			||||
            updateEntrustRece(this.inputQuery)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.cancelDialog();
 | 
				
			||||
                    this.getList();
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                    this.loading = false;
 | 
				
			||||
                    this.cancelDialog();
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
    handleModifyClick(row) {
 | 
				
			||||
      this.inputQuery = row;
 | 
				
			||||
      this.modifyDialogVisible = true;
 | 
				
			||||
    },
 | 
				
			||||
        handleAddClick() {
 | 
				
			||||
            this.inputQuery = {enable: true, expireTip: true};
 | 
				
			||||
            this.addDialogVisible = true;
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
    deleteDialog(rowId) {
 | 
				
			||||
      this.$confirm("此操作将永久删除该委托验收信息, 是否继续?", "提示", {
 | 
				
			||||
        confirmButtonText: "确定",
 | 
				
			||||
        cancelButtonText: "取消",
 | 
				
			||||
        type: "warning",
 | 
				
			||||
      })
 | 
				
			||||
          .then(() => {
 | 
				
			||||
            this.deleteOrders(rowId);
 | 
				
			||||
          })
 | 
				
			||||
          .catch(() => {
 | 
				
			||||
          });
 | 
				
			||||
    },
 | 
				
			||||
        handleModifyClick(row) {
 | 
				
			||||
            this.inputQuery = row;
 | 
				
			||||
            this.modifyDialogVisible = true;
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
    deleteOrders(data) {
 | 
				
			||||
      this.loading = true;
 | 
				
			||||
      let tquery = {
 | 
				
			||||
        id: data.id + "",
 | 
				
			||||
      };
 | 
				
			||||
      deleteEntrustRece(tquery)
 | 
				
			||||
          .then((response) => {
 | 
				
			||||
            this.getList();
 | 
				
			||||
            if (response.code == 20000) {
 | 
				
			||||
              this.$message({
 | 
				
			||||
                type: "success",
 | 
				
			||||
                message: "删除成功!",
 | 
				
			||||
              });
 | 
				
			||||
            } else {
 | 
				
			||||
              this.$message.error(response.message);
 | 
				
			||||
            }
 | 
				
			||||
        deleteDialog(rowId) {
 | 
				
			||||
            this.$confirm("此操作将永久删除该委托验收信息, 是否继续?", "提示", {
 | 
				
			||||
                confirmButtonText: "确定",
 | 
				
			||||
                cancelButtonText: "取消",
 | 
				
			||||
                type: "warning",
 | 
				
			||||
            })
 | 
				
			||||
                .then(() => {
 | 
				
			||||
                    this.deleteOrders(rowId);
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
 | 
				
			||||
        deleteOrders(data) {
 | 
				
			||||
            this.loading = true;
 | 
				
			||||
            let tquery = {
 | 
				
			||||
                id: data.id + "",
 | 
				
			||||
            };
 | 
				
			||||
            deleteEntrustRece(tquery)
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    this.getList();
 | 
				
			||||
                    if (response.code == 20000) {
 | 
				
			||||
                        this.$message({
 | 
				
			||||
                            type: "success",
 | 
				
			||||
                            message: "删除成功!",
 | 
				
			||||
                        });
 | 
				
			||||
                    } else {
 | 
				
			||||
                        this.$message.error(response.message);
 | 
				
			||||
                    }
 | 
				
			||||
 | 
				
			||||
          })
 | 
				
			||||
          .catch(() => {
 | 
				
			||||
          });
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
        getSyncConfig() {
 | 
				
			||||
            findConfig()
 | 
				
			||||
                .then((response) => {
 | 
				
			||||
                    if (response.code == 20000) {
 | 
				
			||||
                        this.configParms = response.data;
 | 
				
			||||
                    }
 | 
				
			||||
                })
 | 
				
			||||
                .catch(() => {
 | 
				
			||||
                });
 | 
				
			||||
        },
 | 
				
			||||
    },
 | 
				
			||||
    getSyncConfig() {
 | 
				
			||||
      findConfig()
 | 
				
			||||
          .then((response) => {
 | 
				
			||||
            if (response.code == 20000) {
 | 
				
			||||
              this.configParms = response.data;
 | 
				
			||||
            }
 | 
				
			||||
          })
 | 
				
			||||
          .catch(() => {
 | 
				
			||||
          });
 | 
				
			||||
    components: {
 | 
				
			||||
        modifyDialog,
 | 
				
			||||
    },
 | 
				
			||||
    mounted() {
 | 
				
			||||
    },
 | 
				
			||||
    created() {
 | 
				
			||||
        this.getList();
 | 
				
			||||
        this.getSyncConfig();
 | 
				
			||||
    },
 | 
				
			||||
  },
 | 
				
			||||
  components: {
 | 
				
			||||
    modifyDialog,
 | 
				
			||||
  },
 | 
				
			||||
  mounted() {
 | 
				
			||||
  },
 | 
				
			||||
  created() {
 | 
				
			||||
    this.getList();
 | 
				
			||||
    this.getSyncConfig();
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
  },
 | 
				
			||||
};
 | 
				
			||||
</script>
 | 
				
			||||
 | 
				
			||||
					Loading…
					
					
				
		Reference in New Issue