| | |
| | | <el-table-column align="center" label="器具代码" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HMouldNumber" placeholder="请输入器具代码" |
| | | @keyup.native.f7="openDataDialog(8, scope.row)" |
| | | @dblclick.native="openDataDialog(8, scope.row)" /> |
| | | @keyup.native.f7="openDataDialog(17, scope.row)" |
| | | @dblclick.native="openDataDialog(17, scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="器具名称" width="120"> |
| | |
| | | :propsHOrgID="form.HOrgID" v-if="xsSeOutStockBillShow" /> |
| | | <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" /> |
| | | <GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" /> |
| | | <GyCartype @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :volume="form.HCarTypeMaxVolume" v-if="gyCartypeShow" /> |
| | | <GyCartype @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" |
| | | :volume="form.HCarTypeMaxVolume" v-if="gyCartypeShow" /> |
| | | <GyCar @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCarShow" /> |
| | | <GyDriver @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyDriverShow" /> |
| | | <ContractTransport @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" |
| | | v-if="ContractTransportShow" /> |
| | | <GyMould @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyMouldShow" /> |
| | | <AreaDialog @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :HBeginAddrName="form.HBeginAddrName" :HEndAddrName="form.HEndAddrName" v-if="AreaDialogShow" /> |
| | | <GyMaterialPackingRelation @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :propHMaterID="editData[zbIndex].HMaterID" :propHOrgID="form.HOrgID" |
| | | v-if="gyMaterialPackingRelationShow" /> |
| | | <AreaDialog @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="AreaDialogShow" /> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="deptClickSub">确 定</el-button> |
| | | <el-button @click="deptClose">取 消</el-button> |
| | |
| | | import GyCar from "@/views/basic/gyCar/gyCarList.vue" |
| | | import GyDriver from "@/views/system/user/GyDriver.vue" |
| | | import ContractTransport from "@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue" |
| | | import GyMould from '@/views/scMould/basicModeling/Gy_MouldFileList.vue' |
| | | import GyMaterialPackingRelation from '@/views/scMould/basicModeling/Gy_MaterialPackingRelationList.vue' |
| | | import AreaDialog from "@/views/component/AreaDialog" |
| | | export default { |
| | | name: 'SellOutBill', |
| | | components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport, GyMould, AreaDialog }, |
| | | components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport, GyMaterialPackingRelation, AreaDialog }, |
| | | props: { |
| | | OperationType: { type: Number, }, |
| | | linterid: { type: Number, }, |
| | |
| | | gyCarShow: false, //车辆数据组件显示标记 |
| | | gyDriverShow: false, //司机数据组件显示标记 |
| | | ContractTransportShow: false, //承运合同数据组件显示标记 |
| | | gyMouldShow: false, //容器数据组件显示标记 |
| | | gyMaterialPackingRelationShow: false, //容器数据组件显示标记 |
| | | AreaDialogShow: false, //目的地数据组件显示标记 |
| | | deptform: {}, //弹窗选中数据 |
| | | areaType: '',//地区选择类型 |
| | |
| | | } |
| | | else if (this.OperationType == 3 || this.copyType == 1) { |
| | | this.handleUpdate() |
| | | } |
| | | else if (this.OperationType == 4) { |
| | | this.zzSelDis = true |
| | | this.handleAdd() |
| | | var data = this.getUrlVars_JSON(); |
| | | var dataArray = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | // this.getPushSourceBillInit(data[i].hmainid, data[i].hsubid); |
| | | axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', { |
| | | params: { |
| | | "HInterID": data[i].hmainid |
| | | , "HSubID": data[i].hsubid |
| | | }, |
| | | }).then(response => { |
| | | let result = response.data |
| | | if (result.code == 1) { // 说明验证成功了, |
| | | this.temp = result.data[0]; |
| | | } else { |
| | | this.temp = result.data; |
| | | } |
| | | if (this.temp) { |
| | | dataArray.push(this.temp); |
| | | this.form.HDeptID = dataArray[0].HDeptID |
| | | this.form.HDeptName = dataArray[0].部门 |
| | | this.form.HEmpID = dataArray[0].HEmpID |
| | | this.form.HEmpName = dataArray[0].业务员 |
| | | this.form.HManagerID = dataArray[0].HManagerID |
| | | this.form.HManagerName = dataArray[0].主管 |
| | | this.form.HMainSourceInterID = "0" |
| | | this.form.HMainSourceEntryID = "0" |
| | | this.form.HMainSourceBillNo = "" |
| | | this.form.HMainSourceBillType = dataArray[0].HBillType |
| | | this.form.HSupID = dataArray[0].HCusID |
| | | this.form.HSupName = dataArray[0].客户 |
| | | this.form.HLinkMan = dataArray[0].联系人 |
| | | this.form.HLinkPhone = dataArray[0].联系电话 |
| | | this.form.HSellSID = dataArray[0].HSellSID |
| | | this.form.HSellSName = dataArray[0].销售方式 |
| | | this.form.HCurID = dataArray[0].HCurID |
| | | this.form.HCurName = dataArray[0].币别 |
| | | this.form.HExRate = dataArray[0].汇率 |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | this.editData.push( |
| | | { |
| | | "HMaterID": dataArray[i].HMaterID |
| | | , "物料代码": dataArray[i].物料代码 |
| | | , "物料名称": dataArray[i].物料名称 |
| | | , "规格型号": dataArray[i].规格型号 |
| | | , "HUnitID": dataArray[i].HUnitID |
| | | , "计量单位": dataArray[i].计量单位 |
| | | , "HQtyMust": dataArray[i].数量.toFixed(6) |
| | | , "HQty": dataArray[i].数量.toFixed(6) |
| | | , "HPieceQty": "0" |
| | | , "HPrice": dataArray[i].单价.toFixed(4) |
| | | , "HTaxPrice": dataArray[i].实际含税单价.toFixed(4) |
| | | , "HTaxRate": dataArray[i].税率 |
| | | , "HMoney": dataArray[i].金额.toFixed(2) |
| | | , "HTaxMoney": dataArray[i].价税合计.toFixed(2) |
| | | , "HWHID": dataArray[i].HWHID |
| | | , "发货仓库": dataArray[i].HWHName |
| | | , "HRemark": "" |
| | | , "HQty_Full": "0" |
| | | , "HQty_Empty": "0" |
| | | , "HQty_Back": "0" |
| | | , "HCostPrice": "0" |
| | | , "HCostMoney": "0" |
| | | , "HSalePrice": "0" |
| | | , "HSeOrderInterID": dataArray[i].hmainid |
| | | , "HSeOrderEntryID": dataArray[i].hsubid |
| | | , "HSeOrderBillNo": dataArray[i].单据号 |
| | | , "HSourceInterID": dataArray[i].hmainid |
| | | , "HSourceEntryID": dataArray[i].hsubid |
| | | , "HSourceBillNo": dataArray[i].单据号 |
| | | , "HSourceBillType": dataArray[i].HBillType |
| | | , "HRelationQty": "0" |
| | | , "HRelationMoney": "0" |
| | | , 'HSPID': "0" |
| | | , 'HSPName': "" |
| | | , 'HSPGroupID': "0" |
| | | , "HSPGroupName": "" |
| | | , 'HSCWHID': "0" |
| | | , 'HSCWHName': "" |
| | | , 'HSCSPID': "0" |
| | | , 'HSCSPName': "" |
| | | , 'HBatchNo': "" |
| | | , 'HPOOrderInterID': "0" |
| | | , 'HPOOrderEntryID': "0" |
| | | , 'HPOOrderBillNo': "" |
| | | , 'HPropertyID': "0" |
| | | , 'HPropertyName': "" |
| | | , 'HSecUnitID': "0" |
| | | , 'HSecUnitName': "" |
| | | , 'HSecUnitRate': "0" |
| | | , 'HEngineNum': "" |
| | | , 'HUnderPanNum': "" |
| | | , 'HLeaveFactCard': "" |
| | | , 'HReqBuyQty': "0" |
| | | , 'HReqOutQty': "0" |
| | | , 'HCurrentInventory': "0" |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | this.formShow = true |
| | | this.formLoading = false |
| | | }) |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //#endregion |
| | |
| | | handleUpdate() { |
| | | this.reset() |
| | | let rowHmainid = this.linterid |
| | | axios.get(this.$baseUrl + "/Kf_POStockInBill/cx", { |
| | | params: { 'HInterID': rowHmainid } |
| | | axios.get(this.baseURL + "/WLYayBillController/WL_YayBillDetail", { |
| | | params: { 'HID': rowHmainid } |
| | | }).then(response => { |
| | | console.log(response.data.data.h_v_WL_YayBillEdit) |
| | | if (response.data.code == 1) { |
| | |
| | | this.dialogTitle = '客户列表' |
| | | this.gyCustomerShow = true |
| | | this.openData = true |
| | | } else if (num == 8) { |
| | | this.dialogTitle = '容器列表' |
| | | this.gyMouldShow = true |
| | | this.openData = true |
| | | } else if (num == 12) { |
| | | this.dialogTitle = '源单列表' |
| | | this.xsSeOutStockBillShow = true |
| | |
| | | this.dialogTitle = '承运合同列表' |
| | | this.ContractTransportShow = true |
| | | this.openData = true |
| | | } else if (num == 17) { |
| | | this.dialogTitle = '容器包装列表' |
| | | this.gyMaterialPackingRelationShow = true |
| | | this.openData = true |
| | | } |
| | | }, |
| | | //#region 将数据弹窗全部取消加载 |
| | |
| | | this.gyCarShow = false |
| | | this.gyDriverShow = false |
| | | this.ContractTransportShow = false |
| | | this.gyMouldShow = false |
| | | this.gyMaterialPackingRelationShow = false |
| | | }, |
| | | //#endregion |
| | | //#endregion |
| | |
| | | this.form.HCusID = deptRow.HItemID |
| | | this.gyCustomerShow = false |
| | | this.openData = false |
| | | } else if (num == 8) { |
| | | console.log(deptRow) |
| | | this.editData[this.zbIndex].HMouldID = deptRow.hmainid |
| | | this.editData[this.zbIndex].HMouldNumber = deptRow.模具编号 |
| | | this.editData[this.zbIndex].HMouldName = deptRow.模具名称 |
| | | this.editData[this.zbIndex].HMouldLength = deptRow.长 |
| | | this.editData[this.zbIndex].HMouldWidth = deptRow.宽 |
| | | this.editData[this.zbIndex].HMouldFoldHeight = deptRow.折叠高度 |
| | | this.gyMouldShow = false |
| | | this.openData = false |
| | | } else if (num == 12) { |
| | | // 使用异步方式处理源单数据 |
| | | this.processSourceDataAsync(deptRow); |
| | |
| | | this.form.HCarrierID = deptRow.HSupID |
| | | this.form.HCarrierName = deptRow.供应商名称 |
| | | this.ContractTransportShow = false |
| | | this.openData = false |
| | | } else if (num == 17) { |
| | | console.log(deptRow) |
| | | this.editData[this.zbIndex].HMouldID = deptRow.hmainid |
| | | this.editData[this.zbIndex].HMouldNumber = deptRow.容器代码 |
| | | this.editData[this.zbIndex].HMouldName = deptRow.容器名称 |
| | | this.editData[this.zbIndex].HMouldLength = deptRow.长度 |
| | | this.editData[this.zbIndex].HMouldWidth = deptRow.宽度 |
| | | this.editData[this.zbIndex].HMouldHeight = deptRow.高度 |
| | | this.editData[this.zbIndex].HMouldFoldHeight = deptRow.折叠高度 |
| | | this.gyMaterialPackingRelationShow = false |
| | | this.openData = false |
| | | } |
| | | }, |
| | |
| | | return; |
| | | } |
| | | |
| | | const response = await axios.get(this.$baseUrl + '/WLYayBillController/GetMesByOrginBill', { |
| | | const response = await axios.get(this.baseURL + '/WLYayBillController/GetMesByOrginBill', { |
| | | params: { |
| | | "ListMaterial": ListMaterial |
| | | }, |
| | |
| | | //改为异步方法,返回Promise |
| | | async getPushSeOutStockBillInit(HSourceInterID, HSourceEntryID) { |
| | | try { |
| | | const response = await axios.get(this.$baseUrl + '/Kf_SellOutBill/loadXs_SeOutStockBill_Push', { |
| | | const response = await axios.get(this.baseURL + '/Kf_SellOutBill/loadXs_SeOutStockBill_Push', { |
| | | params: { |
| | | "HInterID": HSourceInterID, |
| | | "HSubID": HSourceEntryID |
| | |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | let fhck = false |
| | | this.editData.map((item, index) => { |
| | | if (!item.发货仓库) { |
| | | fhck = true |
| | | this.$modal.msgError("第" + (index + 1) + "行:发货仓库未选择!"); |
| | | var loadingRate = this.form.HLoadingRate; |
| | | if (loadingRate && typeof loadingRate === 'string') { |
| | | this.form.HLoadingRate = parseFloat(loadingRate.replace('%', '')) / 100; |
| | | } |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | console.log(this.form) |
| | | |
| | | // var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType; |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] |
| | | console.log(sMainSub) |
| | | axios({ |
| | | method: 'post', |
| | | url: this.baseURL + "/WLYayBillController/SaveBill", |
| | | data: { |
| | | 'msg': sMainSub |
| | | }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | this.close() |
| | | } else { |
| | | this.$modal.msgError(response.data.Message) |
| | | } |
| | | }) |
| | | this.$nextTick(() => { |
| | | if (!fhck) { |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType; |
| | | axios({ |
| | | method: 'post', |
| | | url: this.$baseUrl + "/Kf_SellOutBill/SaveSellOutBillList", |
| | | data: { |
| | | 'msg': sMainSub |
| | | }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | this.get_MAXNum_Task(1);//设置流水号增加 |
| | | if (response.data.Verify == "Y") //自动审核 |
| | | { |
| | | this.set_CheckBill(0, this.form); //审核 |
| | | } |
| | | this.addBtnShow = true |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | }) |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | set_CheckBill(num, form) { |
| | | var InterID = form.hmainid || form.HInterID |
| | | //逻辑审核方法 |
| | | axios.get(this.$baseUrl + "/Kf_SellOutBill/AuditKf_SellOutBill", { |
| | | axios.get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", { |
| | | params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 组织下拉列表数据初始化 |
| | | fetchData() { |
| | | axios.get(this.$baseUrl + "/Web/GetOrganizations", { |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.organizationList = response.data.data;//组织列表 |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 获取内码、单据号 |
| | | getHBillNo() { |
| | | axios.get(this.$baseUrl + "/WEBSController/GetMaxBillNoAndID_Json", { |
| | | axios.get(this.baseURL + "/Web/GetMAXNum", { |
| | | params: { |
| | | HBillType: '3321' |
| | | } |
| | |
| | | var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1201','${this.form.HDate}',0,0,0,'${Type}','${this.form.HDeptID}'`; |
| | | axios({ |
| | | method: 'get', |
| | | url: this.$baseUrl + "/CommonModel/searchMethod", |
| | | url: this.baseURL + "/CommonModel/searchMethod", |
| | | params: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": "" }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | |
| | | |
| | | //#region 根据用户获取对应职员、部门、销售主管 |
| | | getCzyglByUser() { |
| | | axios.get(this.$baseUrl + '/Xs_SeOrderBill/getCzyglByUser', { |
| | | axios.get(this.baseURL + '/Xs_SeOrderBill/getCzyglByUser', { |
| | | params: { "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let dataForm = response.data.data[0] |
| | |
| | | |
| | | //#region 根据客户获取客户余额 |
| | | getCustomerBalance(HCusID) { |
| | | axios.get(this.$baseUrl + '/Xs_CusRatingChangeBill/getCustomerBalance', { |
| | | axios.get(this.baseURL + '/Xs_CusRatingChangeBill/getCustomerBalance', { |
| | | params: { "HCusID": HCusID, 'CurUserName': sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | var data = response.data.data[0]; |
| | |
| | | |
| | | //#region 根据客户带出联系人、联系电话 |
| | | getCustomerByCusID(HCusID) { |
| | | axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", { |
| | | axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", { |
| | | params: { |
| | | HCusID: HCusID |
| | | } |
| | |
| | | |
| | | //#region 获取销售出库单对应的条码明细 |
| | | getBarCodeNoteBySellOutBill(rowHmainid) { |
| | | axios.get(this.$baseUrl + '/Kf_SellOutBill/BarCodeNote', { |
| | | axios.get(this.baseURL + '/Kf_SellOutBill/BarCodeNote', { |
| | | params: { "HInterID": rowHmainid } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | |
| | | |
| | | //#region 根据主内码与子内码获取源单销售订单数据 |
| | | getPushSourceBillInit(HSourceInterID, HSourceEntryID) { |
| | | axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', { |
| | | axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', { |
| | | params: { |
| | | "HInterID": HSourceInterID |
| | | , "HSubID": HSourceEntryID |
| | |
| | | formData.append('HRemark', ''); |
| | | formData.append('HUserName', sessionStorage["HUserName"]); |
| | | // 设置上传URL |
| | | this.uploadUrl = this.$baseUrl + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | this.uploadUrl = this.baseURL + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | // 发送上传请求 |
| | | axios.post(this.uploadUrl, formData, { |
| | | headers: { |
| | |
| | | formData.append('HUserName', sessionStorage.getItem('HUserName') || ''); |
| | | |
| | | // 设置上传URL |
| | | this.uploadUrl = this.$baseUrl + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | this.uploadUrl = this.baseURL + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | |
| | | // 发送上传请求 |
| | | axios.post(this.uploadUrl, formData, { |