| | |
| | | /> |
| | | </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 |
| | |
| | | @click="openDeptDialog" |
| | | :disabled="isViewMode" |
| | | style="margin-left: 10px" |
| | | disabled |
| | | > |
| | | </el-button> |
| | | </div> |
| | |
| | | v-model="formData.checkboxHStopflag" |
| | | :true-label="1" |
| | | :false-label="0" |
| | | :disabled="!canEditStopFlag" |
| | | disabled |
| | | @change="handleStopFlagChange" |
| | | > |
| | | 是否禁用 |
| | |
| | | |
| | | <!-- 部门选择弹窗 --> |
| | | <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> |
| | |
| | | |
| | | <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, |
| | |
| | | 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: "", |
| | |
| | | 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 = {}; |
| | |
| | | case 1: // 新增 |
| | | this.orgDisabled = true; |
| | | this.formData.HItemID = "0"; |
| | | this.formData.HDeptName =sessionStorage["HSupName"]; |
| | | this.formData.HCompID = sessionStorage["HSupID"]; |
| | | break; |
| | | |
| | | case 2: // 复制 |
| | |
| | | |
| | | 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; |
| | | } |
| | | }, |
| | | |
| | |
| | | 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") |
| | | }`, |
| | | }); |
| | | |
| | |
| | | |
| | | |
| | | 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; |
| | | }, |
| | | |