From a4989ac2090626b23c630a097f5f773f08f8f949 Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期一, 30 三月 2026 09:35:09 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/system/user/GyDriverEdit.vue | 60 ++++++++++++++++++++++++++++++++++--------------------------
1 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/src/views/system/user/GyDriverEdit.vue b/src/views/system/user/GyDriverEdit.vue
index 925035d..341729c 100644
--- a/src/views/system/user/GyDriverEdit.vue
+++ b/src/views/system/user/GyDriverEdit.vue
@@ -67,18 +67,17 @@
/>
</el-form-item>
- <el-form-item label="鎵�灞炲叕鍙�" prop="HDeptID">
+ <el-form-item label="鎵�灞炴壙杩愬晢" prop="HCompID">
<div class="dept-select">
<el-input
v-model="formData.HDeptName"
- placeholder="璇烽�夋嫨鎵�灞炲叕鍙�"
+ placeholder="璇烽�夋嫨鎵�灞炴壙杩愬晢"
readonly
clearable
- :disabled="isViewMode"
/>
<el-input
type="hidden"
- v-model="formData.HDeptID"
+ v-model="formData.HCompID"
style="display: none"
/>
<el-button
@@ -87,6 +86,7 @@
@click="openDeptDialog"
:disabled="isViewMode"
style="margin-left: 10px"
+ disabled
>
</el-button>
</div>
@@ -99,7 +99,7 @@
v-model="formData.checkboxHStopflag"
:true-label="1"
:false-label="0"
- :disabled="!canEditStopFlag"
+ disabled
@change="handleStopFlagChange"
>
鏄惁绂佺敤
@@ -253,13 +253,14 @@
<!-- 閮ㄩ棬閫夋嫨寮圭獥 -->
<el-dialog
- title="dialogTitle"
+ title="鎵胯繍鍟�"
:visible.sync="openData"
width="90%"
top="5vh"
append-to-body
+ disabled
>
- <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
+ <GySupplier ref="supplierRef"@deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
@@ -272,10 +273,10 @@
<script>
import axios from "axios";
-import Dept from "@/views/component/dept";
+import GySupplier from '@/views/basic/gy/gySupplier.vue'
export default {
name: "GyDriverEdit",
- components: { Dept},
+ components: { GySupplier},
props: {
OperationType: {
type: Number,
@@ -313,14 +314,14 @@
HNumber: "",
HName: "",
HHelpCode: "",
- HDeptName: "",
- HDeptID: "0",
+ HDeptName:sessionStorage["HSupName"],
+ HCompID: sessionStorage["HSupID"],
HDepNumber: "",
HIDCard: "",
HPhone: "",
HDriverCardType: "A1",
HEmpType: "鍥哄畾",
- HStopflag: "0",
+ HStopflag: 0,
checkboxHStopflag: 0,
HRemark: "",
HUSEORGID: "",
@@ -399,14 +400,19 @@
this.openData = false;
},
deptClickSub() {
- if (this.deptform && this.deptform.HItemID) {
- this.formData.HDeptName = this.deptform.閮ㄩ棬鍚嶇О;
- this.formData.HDeptID = this.deptform.HItemID;
- this.openData = false;
- this.deptShow = false;
- } else {
- this.$modal.msgWarning("璇峰厛閫夋嫨涓�涓儴闂�");
- }
+ // 鐩存帴浠庡瓙缁勪欢鑾峰彇褰撳墠閫変腑鐨勮鏁版嵁
+ const selectedRow = this.$refs.supplierRef?.rowForm;
+ if (selectedRow && selectedRow.HItemID) {
+ // 璁剧疆琛ㄥ崟鏁版嵁
+ this.formData.HDeptName = selectedRow.渚涘簲鍟嗗悕绉� || selectedRow.HName;
+ this.formData.HCompID = selectedRow.HItemID;
+ this.openData = false;
+ this.deptShow = false;
+
+ this.$modal.msgSuccess("宸查�夋嫨鎵胯繍鍟嗭細" + this.formData.HDeptName);
+ } else {
+ this.$modal.msgWarning("璇峰厛閫夋嫨涓�涓壙杩愬晢");
+ }
},
deptDialogVisible() {
this.deptform = {};
@@ -438,6 +444,8 @@
case 1: // 鏂板
this.orgDisabled = true;
this.formData.HItemID = "0";
+ this.formData.HDeptName =sessionStorage["HSupName"];
+ this.formData.HCompID = sessionStorage["HSupID"];
break;
case 2: // 澶嶅埗
@@ -529,10 +537,10 @@
if (data.绂佺敤鏍囪瘑) {
this.formData.checkboxHStopflag = 1;
- this.formData.HStopflag = "1";
+ this.formData.HStopflag = 1;
} else {
this.formData.checkboxHStopflag = 0;
- this.formData.HStopflag = "0";
+ this.formData.HStopflag = 0;
}
},
@@ -573,7 +581,7 @@
const sMainStr = JSON.stringify(saveData);
const res = await axios.post(`${this.$baseUrl}/Gy_Driver/AddBill1`, {
oMain: `${sMainStr};${sessionStorage.getItem("HUserName")};${
- sessionStorage.getItem("OrganizationID") || 100038
+ sessionStorage.getItem("OrganizationID")
}`,
});
@@ -631,14 +639,14 @@
handleStopFlagChange(value) {
- this.formData.HStopflag = value ? "1" : "0";
+ this.formData.HStopflag = value ? 1 : 0;
},
openDeptDialog() {
this.deptShow = false;
- this.dialogTitle = "閮ㄩ棬鍒楄〃";
- this.deptShow = true;
+ this.dialogTitle = "鎵胯繍鍟嗗垪琛�";
+ this.deptShow = false;
this.openData = true;
},
--
Gitblit v1.9.1