From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示
---
src/views/gyStockPlace/edit/index.vue | 486 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 486 insertions(+), 0 deletions(-)
diff --git a/src/views/gyStockPlace/edit/index.vue b/src/views/gyStockPlace/edit/index.vue
new file mode 100644
index 0000000..9bd7260
--- /dev/null
+++ b/src/views/gyStockPlace/edit/index.vue
@@ -0,0 +1,486 @@
+<template>
+ <div v-loading="formLoading" v-if="formShow">
+ <div style="margin-bottom: 10px; border-bottom: 1px solid #f6f6f6">
+ <el-button type="primary" @click="submitForm" :disabled="subDisabled"
+ >淇� 瀛�</el-button
+ >
+ <el-button type="primary" @click="close">閫� 鍑�</el-button>
+ </div>
+ <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+ <el-tabs v-model="activeName" type="card">
+ <el-tab-pane label="鍩烘湰淇℃伅" name="first">
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="浠撲綅浠g爜" prop="HNumber">
+ <el-input v-model="form.HNumber" placeholder="璇疯緭鍏ヤ粨搴撲唬鐮�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="浠撲綅鍚嶇О" prop="HName">
+ <el-input v-model="form.HName" placeholder="璇疯緭鍏ヤ粨搴撳悕绉�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵�灞炰粨浣�" prop="HSPGroupName" class="form-inline">
+ <el-input disabled v-model="form.HSPGroupName" placeholder="璇烽�夋嫨浠撲綅">
+ </el-input>
+ <el-button icon="el-icon-search" @click="openDataDialog(1)"></el-button>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="浣跨敤缁勭粐" prop="HUSEORGID">
+ <el-select
+ v-model="form.HUSEORGID"
+ placeholder="璇烽�夋嫨缁勭粐"
+ :disabled="zzSelDis"
+ >
+ <el-option
+ v-for="(item, index) in organizationList"
+ :key="index"
+ :label="item.Name"
+ :value="item.ID"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍔╄鐮�" prop="HHelpCode">
+ <el-input v-model="form.HAddress" placeholder="璇疯緭鍏ュ姪璁扮爜" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="澶囨敞" prop="HRemark">
+ <el-input v-model="form.HPhone" placeholder="璇疯緭鍏ュ娉�" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="榛樿浠撲綅" prop="HStandard">
+ <el-checkbox v-model="form.HStandard">鏄惁榛樿</el-checkbox>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="绂佺敤鏍囧織" prop="HStopflag">
+ <el-checkbox v-model="form.HStopflag" disabled>鏄惁绂佺敤</el-checkbox>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row> </el-row>
+ </el-tab-pane>
+ </el-tabs>
+ </el-form>
+ <!-- 閮ㄩ棬寮圭獥 -->
+ <el-dialog
+ :title="dialogTitle"
+ :visible.sync="openData"
+ width="1280px"
+ append-to-body
+ >
+ <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
+ <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
+ <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
+ <GyWorkCenter @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="workCenterShow" />
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
+ <el-button @click="deptClose">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import axios from "axios";
+import Dept from "@/views/component/dept";
+import Warehouse from "@/views/component/warehouse";
+import Material from "@/views/component/material";
+import RowSettings from "@/views/component/rowSettings";
+import GyWorkCenter from "@/views/component/gyWorkCenter";
+import Employee from "@/views/component/employee";
+import moment from "moment";
+import dayjs from "dayjs";
+
+export default {
+ name: "gyWarehouse_Edit",
+ components: { Dept, Warehouse, Material, RowSettings, GyWorkCenter, Employee },
+ props: {
+ OperationType: { type: Number },
+ linterid: { type: Number },
+ HSouceBillType: { type: String },
+ copyType: { type: Number },
+ },
+ data() {
+ return {
+ formShow: false,
+ temp: undefined,
+ formLoading: true,
+ zzSelDis: false,
+ rowHideShow: false,
+ openRowHide: false,
+ workCenterShow: false,
+ sWhere: "",
+ sTime: "",
+ eTime: "",
+ zbIndex: null,
+ dialogTypeNum: null, //閮ㄩ棬寮圭獥1锛屼粨搴撳脊绐�2
+ deptShow: false, //閮ㄩ棬鏁版嵁缁勪欢
+ warehouseShow: false, //浠撳簱鏁版嵁缁勪欢
+ materialShow: false, //鐗╂枡鏁版嵁缁勪欢
+ employeeShow: false, // 浠撳簱绠$悊鍛樼粍浠�
+ deptform: {}, //寮圭獥閫変腑鏁版嵁
+ openData: false, //鏁版嵁寮圭獥
+ dialogTitle: "",
+ zuzhiId: 0,
+ organizationList: [], //缁勭粐鍒楄〃
+ subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
+ CheckBillDisabled: true,
+ // OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
+ HInterID: null,
+ baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
+ user: "admin",
+ currentRow: [],
+ lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
+ lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
+ selectedRow: null, // 褰撳墠閫変腑鐨勮
+ rowForm: {},
+ checkedSysZb: [],
+ editData: [], //瀛愯〃
+ editBtData: [], //瀛愯〃琛ㄥご
+ activeName: "first",
+ searchOpen: false,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+
+ // 琛ㄥ崟鍙傛暟
+ form: {
+ HWarehouseType: "鐢熶骇浠撳簱",
+ },
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ HNumber: [{ required: true, message: "浠撳簱浠g爜涓嶈兘涓虹┖", trigger: "blur" }],
+ HName: [{ required: true, message: "浠撳簱鍚嶇О鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }],
+ HWarehouseType: [
+ { required: true, message: "浠撳簱绫诲瀷涓嶈兘涓虹┖", trigger: "blur" },
+ ],
+ },
+
+ HWarehouseTypeList: [
+ {
+ Name: "鐢熶骇浠撳簱",
+ },
+ {
+ Name: "妯″叿浠撳簱",
+ },
+ ],
+ };
+ },
+ created() {
+ this.reset();
+ this.fetchData();
+ },
+ activated() {
+ this.reset();
+ this.fetchData();
+ },
+ methods: {
+ fetchData() {
+ //鐧诲綍鐢ㄦ埛淇℃伅
+ axios
+ .get(
+ "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
+ )
+ .then((response) => {
+ let data = response.data.data[0];
+ this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
+ this.user = data.Czymc;
+ axios
+ .get(this.$baseUrl + "/Web/GetOrganizations", {})
+ .then((response) => {
+ if (response.data.count == 1) {
+ this.organizationList = response.data.data; //缁勭粐鍒楄〃
+ this.getdata();
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ getdata() {
+ this.reset();
+ console.log(this.OperationType);
+ if (this.OperationType != 1) {
+ this.zzSelDis = true;
+ axios
+ .get(this.$baseUrl + "/Gy_StockPlace/cx", {
+ params: {
+ HInterID: this.linterid,
+ },
+ })
+ .then((response) => {
+ console.log(response);
+ let result = response.data;
+ if (result.code == 1) {
+ // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data[0];
+
+ Object.assign(this.form, {
+ HItemID: data.HMainID,
+ HNumber: data.浠撲綅浠g爜,
+ HName: data.浠撲綅鍚嶇О,
+ HHelpCode: data.鍔╄鐮�,
+ HRemark: data.澶囨敞,
+ HSPGroupID: data.HSPGroupID,
+ HSPGroupName: data.鎵�灞炰粨浣�,
+ HStopflag: data.绂佺敤鏍囪 == "Y" ? true : false,
+ HStandard: data.榛樿浠撲綅 == "Y" ? true : false,
+ });
+ if (!data.HCheckEmp) {
+ this.CheckBillDisabled = false;
+ }
+ }
+ this.$nextTick(() => {
+ this.formShow = true;
+ this.formLoading = false;
+ });
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ } else if (this.OperationType == 1) {
+ let date = new Date();
+ this.form.HMakeDate = moment(date).format("YYYY-MM-DDTHH:mm:ss");
+ this.$nextTick(() => {
+ this.formShow = true;
+ this.formLoading = false;
+ });
+ }
+ },
+ handleRowHide() {
+ this.rowHideShow = true;
+ this.openRowHide = true;
+ },
+ rowSetClose(val) {
+ this.rowHideShow = false;
+ this.openRowHide = val;
+ },
+ organizationChange(val) {
+ // let options=undefined
+ // this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
+ },
+ //寮圭獥璧嬪��
+ dbEmitData(deptRow, num) {
+ console.log(deptRow, num);
+ // num=1 浠撳簱
+ if (num == 2) {
+ Object.assign(this.form, {
+ HSPGroupName: deptRow.浠撳簱鍚嶇О,
+ HSPGroupID: deptRow.HItemID,
+ HSPGroupNumber: deptRow.浠撳簱浠g爜,
+ });
+
+ this.openData = false;
+ }
+ },
+ emitData(deptRow, num) {
+ this.dialogTypeNum = num;
+ this.deptform = deptRow;
+ },
+ deptClickSub() {
+ this.dbEmitData(this.deptform, this.dialogTypeNum);
+ this.deptform = {};
+ },
+ deptClose() {
+ this.deptform = {};
+ this.openData = false;
+ },
+
+ //鏂板缂栬緫琛ㄥ崟鍒濆鍖�
+ reset() {
+ this.form = {
+ HNumber: null,
+ HItemID: 0,
+ HName: null,
+ HHelpCode: null,
+ HWorkTimes: "0",
+ HMaxWorkTimes: "0",
+ HRelationID: "0",
+ HMinAdd: "0",
+ HClassCount: "0",
+ HOverTimes: "0",
+ HCenter: null,
+ HCenterID: null,
+ HGroup: null,
+ HGroupID: 0,
+ HDeptName: null,
+ HDeptID: 0,
+ HProcName: null,
+ HProcID: 0,
+ HProcNumber: null,
+ HStopflag: false,
+ HType: null,
+ HRemark: null,
+ HUseFlag: "鏈娴�",
+ HUSEORGID: this.zuzhiId,
+ HCREATEORGID: this.zuzhiId,
+ HMacAddr: null,
+ HEmpID: 0,
+ HEmpName: null,
+ HMakeEmp: this.user,
+ HMakeTime: null,
+ HStopEmp: null,
+ HStopTime: null,
+ HCheckEmp: null,
+ HCheckTime: null,
+ HPrimarySourceID: 0,
+ HPrimarySourceName: null,
+ HParentID: 0,
+ HCubicleQty: "1",
+ HProdLinePeopleNum: "0",
+ };
+ this.editData = [];
+ this.editBtData = [];
+ this.ids = [];
+ this.formShow = false;
+ this.subDisabled = false;
+ this.formLoading = true;
+ this.CheckBillDisabled = true;
+ this.activeName = "first";
+ this.resetForm("form");
+ },
+ //閫�鍑�
+ close() {
+ this.reset();
+ this.formShow = false;
+ // console.log()
+ this.$emit("editCloseGy", 0);
+ },
+ // 缂栬緫鎻愪氦淇濆瓨
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ let fhck = false;
+ this.$nextTick(() => {
+ if (!fhck) {
+ console.log(4);
+ var sMainStr = JSON.stringify(this.form);
+ // var sSubStr = JSON.stringify(this.editData);
+ var sMainSub = sMainStr + ";" + this.user;
+ axios({
+ method: "post",
+ url: this.$baseUrl + "/Gy_StockPlace/AddBill1",
+ data: {
+ oMain: sMainSub,
+ },
+ })
+ .then((response) => {
+ console.log(response);
+ if (response.data.count == 1) {
+ this.subDisabled = true; //璁剧疆淇濆瓨鎸夐挳涓嶅彲鐢�
+ this.CheckBillDisabled = false;
+ this.$modal.msgSuccess(response.data.Message);
+ } else {
+ this.$modal.msgError(response.data.Message);
+ this.CheckBillDisabled = false;
+ this.subDisabled = false; //璁剧疆淇濆瓨鎸夐挳鍙敤
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }
+ });
+ }
+ });
+ },
+
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete() {
+ this.$modal
+ .confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠")
+ .then(() => {
+ if (this.rowForm.鐘舵�� == "鍒涘缓") {
+ axios
+ .get(this.$baseUrl + "/Kf_SellOutBill/DeltetSellOutBill", {
+ params: { HInterID: this.rowForm.hmainid.toString(), user: this.user },
+ })
+ .then((response) => {
+ if (response.data.count == 1) {
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ } else {
+ this.$modal.msgError("姝ゆ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎!");
+ }
+ })
+ .catch(() => {});
+ },
+ // 鍙嶅鏍�/瀹℃牳鏁版嵁
+ set_CheckBill(num, form) {
+ var InterID = form.HItemID || form.HInterID;
+ //閫昏緫瀹℃牳鏂规硶
+ axios
+ .get(this.$baseUrl + "/Gy_Warehouse/AuditGy_Warehouse", {
+ params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
+ })
+ .then((response) => {
+ let result = response.data;
+ if (result.code == 1) {
+ this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+ this.CheckBillDisabled = true;
+ } else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message);
+ }
+ })
+ .catch((error) => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ showReset() {
+ this.deptShow = false;
+ this.warehouseShow = false;
+ this.materialShow = false;
+ this.workCenterShow = false;
+ },
+ // 鎵撳紑鏁版嵁鍒楄〃寮圭獥
+ openDataDialog(num, row) {
+ if (row) {
+ this.zbIndex = row.index - 1;
+ }
+ this.showReset();
+ if (num == 1) {
+ this.dialogTitle = "浠撲綅鍒楄〃";
+ this.warehouseShow = true;
+ this.openData = true;
+ }
+ },
+ },
+};
+</script>
+<style>
+.xsckdBox .el-date-editor.el-input {
+ width: 100%;
+}
+
+.form-inline > .el-form-item__content {
+ display: flex;
+ flex-direction: row;
+}
+</style>
--
Gitblit v1.9.1