wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/ProductInBill/Kf_ProductInBillEdit.vue
@@ -164,7 +164,7 @@
        @selection-change="handleTableZbEdit" :row-class-name="rowSysZbIndex" show-summary border>
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column align="center" label="序号" type="index" width="80" />
        <el-table-column align="center" label="源单单号" width="120">
        <!-- <el-table-column align="center" label="源单单号" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HSourceBillNo }}</span>
          </template>
@@ -183,7 +183,7 @@
          <template slot-scope="scope">
            <span>{{ scope.row.HSourceEntryID }}</span>
          </template>
        </el-table-column>
        </el-table-column> -->
        <el-table-column align="center" label="HMaterID" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HMaterID }}</span>
@@ -372,7 +372,7 @@
    this.getdata()
  },
  beforeDestroy() {
    this.$destroy()
    // this.$destroy()
  },
  methods: {
    //#region 表单数据初始化
@@ -450,7 +450,7 @@
    handleUpdate() {
      this.reset()
      let rowHmainid = this.linterid
      axios.get(this.baseURL + "/Kf_ProductInBillEdit/cx", {
      axios.get(this.$baseUrl + "/Kf_ProductInBillEdit/cx", {
        params: { 'HInterID': rowHmainid }
      }).then(response => {
        if (response.data.count == 1) {
@@ -524,10 +524,10 @@
            )
          }
          if (data.状态 != '创建' && this.copyType != 1) {
            this.$modal.msgError("此条数据不是创建状态,不能修改");
            this.subDisabled = true
          }
          // if (data.状态 != '创建' && this.copyType != 1) {
          //   this.$modal.msgError("此条数据不是创建状态,不能修改");
          //   this.subDisabled = true
          // }
          this.formShow = true
          this.formLoading = false
@@ -606,7 +606,8 @@
        this.form.HManagerName = deptRow.负责人
        this.openData = false
      } 
      else if (num == 2) {                                                      //收料仓库
      else if (num == 2) {
        console.log(deptRow)                                                     //收料仓库
        this.editData[this.zbIndex].HWHID = deptRow.HItemID;
        this.editData[this.zbIndex].收料仓库 = deptRow.仓库名称;
        this.openData = false
@@ -659,9 +660,9 @@
        if (valid) {
          let fhck = false
          this.editData.map((item, index) => {
            if (!item.发货仓库) {
            if (!item.收料仓库) {
              fhck = true
              this.$modal.msgError("第" + (index + 1) + "行:发货仓库未选择!");
              this.$modal.msgError("第" + (index + 1) + "行:收料仓库未选择!");
            }
          })
          this.$nextTick(() => {
@@ -671,7 +672,7 @@
              var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType;
              axios({
                method: 'post',
                url: this.baseURL + "/Kf_SellOutBill/SaveSellOutBillList",
                url: this.$baseUrl + "/Kf_SellOutBill/SaveSellOutBillList",
                data: {
                  'msg': sMainSub
                },
@@ -679,7 +680,7 @@
                if (response.data.count == 1) {
                  this.subDisabled = true//设置保存按钮不可用
                  this.$modal.msgSuccess(response.data.Message);
                  this.get_MAXNum_Task(1);//设置流水号增加
                  // this.get_MAXNum_Task(1);//设置流水号增加
                  if (response.data.Verify == "Y") //自动审核
                  {
                    this.set_CheckBill(0, this.form); //审核
@@ -700,7 +701,7 @@
    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
@@ -759,7 +760,7 @@
          HMoney: 0,
          HTaxMoney: 0,
          HWHID: 0,
          发货仓库: '',
          收料仓库: '',
          HRemark: '',
          HQty_Full: 0,
          HQty_Empty: 0,
@@ -769,10 +770,10 @@
          HSalePrice: 0,
          HSeOrderInterID: 741,
          HSeOrderEntryID: 18,
          HSeOrderBillNo: 'XSFH00000747',
          HSourceInterID: 741,
          HSourceEntryID: 18,
          HSourceBillNo: 'XSFH00000747',
          HSeOrderBillNo: '',
          HSourceInterID: 0,
          HSourceEntryID: 0,
          HSourceBillNo: '',
          HSourceBillType: 1402,
          HRelationQty: 0,
          HRelationMoney: 0,
@@ -895,7 +896,7 @@
    //#region 组织下拉列表数据初始化
    fetchData() {
      axios.get(this.baseURL + "/Web/GetOrganizations", {
      axios.get(this.$baseUrl + "/Web/GetOrganizations", {
      }).then(response => {
        if (response.data.count == 1) {
          this.organizationList = response.data.data;//组织列表
@@ -909,7 +910,7 @@
    //#region 源单类型下拉列表数据初始化
    fetchData_SourceBillTypeList() {
      var HName = '产品入库单';
      axios.get(this.baseURL + "/Web/GetHSourceBillType", {
      axios.get(this.$baseUrl + "/Web/GetHSourceBillType", {
        params: {
          HName: HName, 
          Num: 2
@@ -926,9 +927,9 @@
    //#region 获取内码、单据号
    getHBillNo() {
      axios.get(this.baseURL + "/WEBSController/GetMaxBillNoAndID_Json", {
      axios.get(this.$baseUrl + "/WEBSController/GetMaxBillNoAndID_Json", {
        params: {
          HBillType: '1201'
          HBillType: '1202'
        }
      }).then(response => {
        this.form.HBillNo = response.data.data[0].HBillNo
@@ -941,10 +942,11 @@
    //#region 获取最大单据号
    get_MAXNum_Task(Type) {
      var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1201','${this.form.HDate}',0,0,0,'${Type}','${this.form.HDeptID}'`;
      console.log(dayjs(this.form.HDate).format("YYYY-MM-DD"))
      var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1202','${dayjs(this.form.HDate).format("YYYY-MM-DD")}',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) {
@@ -960,7 +962,7 @@
    //#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]
@@ -978,7 +980,7 @@
    //#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];
@@ -993,7 +995,7 @@
    //#region 根据客户带出联系人、联系电话
    getCustomerByCusID(HCusID) {
      axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
      axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
        params: {
          HCusID: HCusID
        }
@@ -1010,7 +1012,7 @@
  
    //#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) {
@@ -1027,7 +1029,7 @@
    //#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