| | |
| | | editData: [],//销售出库单子表 |
| | | editBtData: [],//子表表头 |
| | | activeName: 'first', |
| | | dataID:'', |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | |
| | | }); |
| | | }, |
| | | getdata() { |
| | | console.log('OperationType:', this.OperationType) // 应该是 4 |
| | | console.log('copyType:', this.copyType) // 应该是 undefined |
| | | console.log('propsData:', this.propsData) // 应该不是空 |
| | | this.formShow = false |
| | | this.formLoading = true |
| | | if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) { |
| | | this.handleAdd() |
| | | } else if (this.OperationType == 3 || this.copyType == 1) { |
| | | this.handleUpdate() |
| | | }else if (this.OperationType == 4) { |
| | | this.handleMove() |
| | | } |
| | | }, |
| | | // 获取参数_传递的JSON格式参数 |
| | |
| | | // let options=undefined |
| | | // this.form=this.organizationList.find(option => option.ID === val)?.Name || ''; |
| | | }, |
| | | /** 下推打开 */ |
| | | handleMove() { |
| | | this.reset() |
| | | //新增获取单据号 |
| | | this.getHBillNo() |
| | | let date = new Date() |
| | | this.form.HDate = moment(date).format('YYYY-MM-DD') |
| | | |
| | | // //设置源单类型 |
| | | // this.form.HSourceBillType = this.HSouceBillType |
| | | //获取源单数据 |
| | | var data = this.getUrlVars_JSON().data; |
| | | this.processSourceBills(data) |
| | | this.$nextTick(() => { |
| | | this.formShow = true |
| | | this.formLoading = false |
| | | }) |
| | | }, |
| | | async processSourceBills(data) { |
| | | const dataArray = []; |
| | | try { |
| | | for (var i = 0; i < data.length; i++) { |
| | | const result = await this.GetSourceBillList(data[i].HInterID, data[i].HEntryID); |
| | | dataArray.push(result); |
| | | } |
| | | // 所有异步操作完成后执行 |
| | | this.setInitBySourceBill(dataArray); |
| | | } catch (error) { |
| | | console.error("处理出错:", error); |
| | | } |
| | | }, |
| | | GetSourceBillList(hmainid, hsubid, HBillType) { |
| | | return new Promise((resolve, reject) => { |
| | | axios.get(this.$baseUrl + '/Pay_WayBillPaymentBillController/getOrginBill', { |
| | | params: { |
| | | "HInterID": hmainid, |
| | | "HEntryID": hsubid, |
| | | |
| | | }, |
| | | }).then(response => { |
| | | let result = response.data |
| | | if (result.code == 1) { // 说明验证成功了, |
| | | resolve(result.data[0]); |
| | | } else { |
| | | resolve(result.data); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | reject(error); |
| | | }); |
| | | }); |
| | | }, |
| | | setInitBySourceBill(dataArray){ |
| | | var data = dataArray[0] |
| | | this.form.HCarrierID = data.HCarrierID |
| | | this.form.HCarrierName = data.HCarrierName |
| | | this.form.HCurID = data.币别 |
| | | this.form.HCurName = data.币别名称 |
| | | |
| | | this.form.HDeptID = sessionStorage.getItem("deptID") |
| | | this.form.HDeptName = sessionStorage.getItem("deptName") |
| | | this.form.HEmpID = sessionStorage.getItem("empID") |
| | | this.form.HEmpName = sessionStorage.getItem("empName") |
| | | |
| | | this.form.HSupID = data.HCarrierID |
| | | this.form.HSupName = data.HCarrierName |
| | | |
| | | |
| | | //子表 赋值 |
| | | var rowdata = []; |
| | | for (let i = 0; i < dataArray.length; i++) { |
| | | this.dataID = this.dataID+","+dataArray[i].HInterID |
| | | rowdata.push( |
| | | { |
| | | "HBeginAddr": dataArray[i].始发地 |
| | | , "HBeginAddrName": dataArray[i].始发地名称 == null ? "" : dataArray[i].始发地名称 |
| | | , "HEndAddr": dataArray[i].目的地 == null ? "" : dataArray[i].目的地 |
| | | , "HEndAddrName": dataArray[i].目的地名称 == null ? "" : dataArray[i].目的地名称 |
| | | , "HTransType": dataArray[i].HTransType == null ? "" : dataArray[i].HTransType |
| | | , "HMoney": dataArray[i].HMoney == null ? "" : dataArray[i].HMoney |
| | | |
| | | } |
| | | ) |
| | | } |
| | | this.editData = rowdata |
| | | }, |
| | | //部门弹窗赋值 |
| | | dbEmitData(deptRow, num) { |
| | | // console.log('dbEmitData 被调用'); |
| | |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var sAllStr = JSON.stringify(this.allVal) |
| | | var refs=this.OperationType==1?"Add":"Update" |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + refs + ";" + sessionStorage["HUserName"] + ';' + sAllStr; |
| | | var refs=this.OperationType==3?"Update":"Add" |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + refs + ";" + sessionStorage["HUserName"] + ';' + sAllStr+';'+this.dataID; |
| | | axios({ |
| | | method: 'post', |
| | | url: this.$baseUrl + "/Pay_WayBillPaymentBillController/saveBILL", |
| | |
| | | import GyMaterialPackingRelation from '@/views/scMould/basicModeling/Gy_MaterialPackingRelationList.vue' |
| | | import AreaDialog from "@/views/component/AreaDialog" |
| | | export default { |
| | | name: 'SellOutBill', |
| | | name: 'Add_Edit_WL_YayBill.vue', |
| | | components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport, GyMaterialPackingRelation, AreaDialog }, |
| | | props: { |
| | | OperationType: { type: Number, }, |
| | |
| | | @click="handleVolume(rowForm)">维护零单占用体积</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single" |
| | | @click="SelectPayWayBill()">下推运单费用</el-button> |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" |
| | | @click="handlePush(row = rowForm, OperationType = 4)">下推(费用结算单)</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single" |
| | |
| | | <!-- 包装容器出入库明细 --> |
| | | <PackStockDetail :visible.sync="packStockDetailShow" ref="packStockDetail" /> |
| | | <!-- 下推 --> |
| | | <el-dialog title="下推" :visible.sync="selectEdit" width="1480px" append-to-body class="xsckdBox" |
| | | @close="close"> |
| | | <edit :OperationType=OperationType :linterid=this.rowForm.HInterID :HEntryID=this.rowForm.HEntryID |
| | | :copyType="copyType" @editClose="editClose" v-if="TranEditShow" /> |
| | | <el-dialog title="下推运单结算单" :visible.sync="openPush" width="1480px" append-to-body class="xsckdBox" @close="close"> |
| | | <PayMentOtherBillTranEdit :OperationType='4' :propsData='pushData' :HSouceBillType=this.rowForm.HSourceBillType |
| | | @editClose="pushClose" v-if="pushShow" /> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import RowSettings from '@/views/component/rowSettings' //列设置组件 |
| | | import PrintList from '@/views/component/printList' //打印组件 |
| | | import BarCodeDetail from '@/views/component/BarCodeDetail' //条码明细组件 |
| | | import PackStockDetail from '@/views/component/PackStockDetail' //条码明细组件 |
| | | import PackStockDetail from '@/views/component/PackStockDetail' //条码明细组件 |
| | | import Edit from '@/views/logistics/transportGPS/Add_Edit_WL_YayBill' //编辑页面组件 |
| | | import PayMentOtherBillTranEdit from "@/views/logistics/WayBillPaymentBill/Pay_WayBillPaymentBillEdit.vue"; //编辑页面组件 |
| | | export default { |
| | | name: 'WL_YayBill', |
| | | components: { BarCodeDetail,PackStockDetail,Edit,PayMentOtherBillTranEdit,RowSettings,PrintList}, |
| | | components: { BarCodeDetail,PackStockDetail,Edit,RowSettings,PrintList,PayMentOtherBillTranEdit}, |
| | | data() { |
| | | return { |
| | | baseURL: process.env.VUE_APP_BASE_API, //后端接口前缀(后端服务器ip地址) |
| | |
| | | title: "", // 弹出层标题 |
| | | open: false, // 是否显示弹出层 |
| | | loading: true, // 遮罩层 |
| | | |
| | | rowList: [], // 选中行数据集合 |
| | | activeSeach: '', |
| | | // addBtnShow: false, //编辑组件容器显示标记 |
| | | editShow: false, //编辑组件容器显示标记 |
| | | openEdit: false, //编辑组件显示标记 |
| | | pushShow: false, |
| | | openPush: false, |
| | | pushData:'', |
| | | openPrintList: false, //打印组件容器显示标记 |
| | | printListShow: false, //打印组件显示标记 |
| | | openBtnHide: false, //按钮组件容器显示标记 |
| | |
| | | barCodeDetailShow: false, //条码明细组件容器显示标记 |
| | | packStockDetailShow: false, //包装容器出入库明细容器显示标记 |
| | | openVolume: false, //维护零单占用体积弹窗标记 |
| | | selectEdit: false, |
| | | TranEditShow: false, |
| | | // 查询参数 |
| | | sWhere: '', // 拼接过滤条件 |
| | | queryParams: { // form数据 |
| | |
| | | //#region 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | // this.rowForm = {} |
| | | this.rowList=selection |
| | | this.ids = selection.map(item => item.HInterID) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | |
| | | this.openEdit = true |
| | | this.OperationType = 4 |
| | | }, |
| | | //关闭下推页面 |
| | | pushClose(val) { |
| | | this.open = val |
| | | this.pushShow = false |
| | | this.openPush = val |
| | | this.clearData() |
| | | this.getList() |
| | | }, |
| | | //#endregion |
| | | cancelVolume() { |
| | | this.openVolume = false |
| | |
| | | }); |
| | | }, |
| | | //#endregion |
| | | //#region 打开下推组件弹窗 |
| | | handlePush() { |
| | | |
| | | if (this.rowList && this.rowList.length > 0) { |
| | | var dataArray = []; |
| | | for (var i = 0; i < this.rowList.length; i++) { |
| | | if (this.rowList[i].单据状态 != "已审核") { |
| | | this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】不为已审核状态,不允许下推!") |
| | | return; |
| | | } |
| | | if (this.rowList[i].HQtyMust <= 0) { |
| | | this.$modal.msgError("下推失败!所选单据【" + this.rowList[i].单据号 + "】对应可下推数量必须大于 0 !") |
| | | return; |
| | | } |
| | | var temp = { |
| | | "HInterID": this.rowList[i].HInterID |
| | | , "HEntryID": this.rowList[i].HEntryID |
| | | , "HBillStatus": this.rowList[i].单据状态 |
| | | } |
| | | dataArray.push(temp); |
| | | } |
| | | var datajson = { |
| | | "data": dataArray |
| | | }; |
| | | this.pushData = JSON.stringify(datajson) |
| | | this.pushShow = true |
| | | this.openPush = true |
| | | } else { |
| | | this.$modal.msgError("请选择数据下推!") |
| | | } |
| | | }, |
| | | //#endregion |
| | | //#region 关闭/反关闭 |
| | | set_CloseBills(num) { |
| | | var InterID = form.hmainid || form.HInterID |
| | |
| | | this.tableShow = true |
| | | this.openEdit = false |
| | | this.editShow = false |
| | | this.pushShow = false |
| | | this.openPush = false |
| | | this.handleQuery() |
| | | }, |
| | | //#endregion |