wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/sell/xsSeOrderBill/xsSeOrderBillEdit.vue
@@ -435,18 +435,18 @@
        </el-table-column>
        <el-table-column align="center" label="仓库" width="120">
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.HQty"
            <el-input
              v-model="scope.row.仓库"
              :min="1"
              style="width: 90px"
              controls-position="right"
            ></el-input-number>
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column align="center" label="数量2" width="120">
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.HPrice"
              v-model="scope.row.HQty"
              :min="0"
              style="width: 90px"
              controls-position="right"
@@ -455,22 +455,22 @@
        </el-table-column>
        <el-table-column align="center" label="单价" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HTaxPrice }}</span>
            <span>{{ scope.row.HPrice }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="加税合计" width="120">
        <el-table-column align="center" label="价税合计" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HTaxRate }}</span>
            <span>{{ scope.row.HTaxMoney }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="客户规格型号" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HPrice * scope.row.HQty }}</span>
            <span>{{ scope.row.HPrice * scope.row.规格型号 }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="交货日期" width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.HTaxPrice * scope.row.HQty }}</span>
            <span>{{ scope.row.HTaxPrice * scope.row.HDate }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="备注" width="120">
@@ -630,7 +630,7 @@
  methods: {
    fetchData() {
      axios
        .get(this.baseURL + "/Web/GetOrganizations", {})
        .get(this.$baseUrl + "/Web/GetOrganizations", {})
        .then((response) => {
          if (response.data.count == 1) {
            this.organizationList = response.data.data.map((item) => {
@@ -648,8 +648,8 @@
    getdata() {
      this.HInterID2 = this.$route.query.HInterID || this.linterid || 0;
      this.OperationType2 = this.$route.query.OperationType || this.OperationType || 1;
      this.CopyType2 = this.$route.query.copyType || this.copyType || -1;
      console.log(this.CopyType2, this.OperationType2, this.HInterID2);
      this.CopyType2 = this.$route.query.CopyType || this.copyType || -1;
      console.log("传递的参数",this.$route.query.CopyType,this.$route.query.OperationType, this.$route.query.HInterID);
      this.formShow = false;
      this.formLoading = true;
@@ -661,7 +661,7 @@
        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", {
            .get(this.$baseUrl + "/Xs_SeOrderBill/loadXs_SeOrderBill_Push", {
              params: {
                HInterID: data[i].hmainid,
              },
@@ -712,7 +712,7 @@
                    HMoney: dataArray[i].金额.toFixed(2),
                    HTaxMoney: dataArray[i].价税合计.toFixed(2),
                    HWHID: dataArray[i].HWHID,
                    发货仓库: dataArray[i].HWHName,
                    仓库: dataArray[i].HWHName,
                    HRemark: "",
                    HQty_Full: "0",
                    HQty_Empty: "0",
@@ -784,7 +784,7 @@
    //根据主内码与子内码获取源单销售订单数据
    getPushSourceBillInit(HSourceInterID, HSourceEntryID) {
      axios
        .get(this.baseURL + "/Xs_SeOrderBill/loadXs_SeOrderBill_Push", {
        .get(this.$baseUrl + "/Xs_SeOrderBill/loadXs_SeOrderBill_Push", {
          params: {
            HInterID: HSourceInterID,
            HSubID: HSourceEntryID,
@@ -935,8 +935,10 @@
    //退出
    close() {
      this.reset();
      if (!this.OperationType2 && !this.copyType) {
      if (window.top != window.self) {
        // iframe 页面 调用父页面的函数关闭弹窗
        window.parent.editGyClose();
      } else if (!this.OperationType2 && !this.copyType) {
        // this.$router.back()
        window.close();
      } else {
@@ -947,7 +949,7 @@
    //根据用户获取对应职员、部门、销售主管
    getCzyglByUser() {
      axios
        .get(this.baseURL + "/Xs_SeOrderBill/getCzyglByUser", {
        .get(this.$baseUrl + "/Xs_SeOrderBill/getCzyglByUser", {
          params: { CurUserName: sessionStorage["HUserName"] },
        })
        .then((response) => {
@@ -980,7 +982,7 @@
    },
    getHBillNo() {
      axios
        .get(this.baseURL + "/WEBSController/GetMaxBillNoAndID_Json", {
        .get(this.$baseUrl + "/WEBSController/GetMaxBillNoAndID_Json", {
          params: {
            HBillType: "1401",
          },
@@ -999,7 +1001,7 @@
    //获取销售出库单对应的条码明细
    getBarCodeNoteBySellOutBill(rowHmainid) {
      axios
        .get(this.baseURL + "/Kf_SellOutBill/BarCodeNote", {
        .get(this.$baseUrl + "/Kf_SellOutBill/BarCodeNote", {
          params: { HInterID: rowHmainid },
        })
        .then((response) => {
@@ -1018,7 +1020,7 @@
    //#region 根据客户获取客户余额
    getCustomerBalance(HCusID) {
      axios
        .get(this.baseURL + "/Xs_CusRatingChangeBill/getCustomerBalance", {
        .get(this.$baseUrl + "/Xs_CusRatingChangeBill/getCustomerBalance", {
          params: { HCusID: HCusID, CurUserName: sessionStorage["HUserName"] },
        })
        .then((response) => {
@@ -1036,7 +1038,7 @@
      this.reset();
      let rowHmainid = this.HInterID2;
      axios
        .get(this.baseURL + "/Xs_SeOrderBill/loadXs_SeOrderBill_Edit", {
        .get(this.$baseUrl + "/Xs_SeOrderBill/loadXs_SeOrderBill_Edit", {
          params: { HInterID: rowHmainid },
        })
        .then((response) => {
@@ -1044,61 +1046,63 @@
            var result = response.data;
            var data = response.data.data[0];
            this.form.BillType = data.HSourceBillType;
            Object.assign(this.form, {
              HBillNo: data.单据号,
              HDate: dayjs(data.日期).format("YYYY-MM-DD"),
              HInnerBillNo: data.辅助字段,
              HAddress: data.交货地址,
              HDeptID: data.HDeptID,
              HDeptName: data.部门,
              HCusID: data.HCusID,
              HCusName: data.客户,
              HEmpID: data.HEmpID,
              HEmpName: data.业务员,
              HCurID: data.HCurID,
              HCurName: data.币别,
              HExRate: data.汇率,
              HEarnestRate: data.定金比例,
              HBillSubType: data.HBillSubType,
              HManagerID: data.HManagerID,
              HManagerName: data.主管,
              HSellSID: data.HSellSID,
              HSellSName: data.销售方式,
              HSSID: data.HSSID,
              HSSName: data.结算方式,
              HSSDate: dayjs(data.结算日期).format("YYYY-MM-DD"),
              HPayCusID: data.HPayCusID,
              HPayCusName: data.结算方,
              HLinkMan: data.联系人,
              HExplanation: data.摘要,
              HLinkPhone: data.联系电话,
              HProjectID: data.HProjectID,
              HProjectNumber: data.项目编码,
              HProjectName: data.项目名称,
              HWHID: data.主仓库id,
              HWHName: data.主仓库,
              HProductType: data.产品类型,
              HCreditRating_Now: data.HCreditRating_Now,
              HRemark: data.表头备注,
              HMaker: data.制单人,
              HMakeDate:
                data.制单人 == "" ? "" : dayjs(data.制单日期).format("YYYY-MM-DD"),
              HUpDater: data.修改人,
              HUpDateDate:
                data.修改人 == "" ? "" : dayjs(data.修改日期).format("YYYY-MM-DD"),
              HChecker: data.审核人,
              HCheckDate:
                data.审核人 == "" ? "" : dayjs(data.审核日期).format("YYYY-MM-DD"),
              HCloseMan: data.关闭人,
              HCloseDate:
                data.关闭人 == "" ? "" : dayjs(data.关闭日期).format("YYYY-MM-DD"),
              HDeleteMan: data.作废人,
              HDeleteDate:
                data.作废人 == "" ? "" : dayjs(data.作废日期).format("YYYY-MM-DD"),
              HChangeMan: data.变更人,
              HChangeDate:
                data.变更人 == "" ? "" : dayjs(data.变更日期).format("YYYY-MM-DD"),
            });
            this.form = {
              ...{
                HBillNo: data.单据号,
                HDate: dayjs(data.日期).format("YYYY-MM-DD"),
                HInnerBillNo: data.辅助字段,
                HAddress: data.交货地址,
                HDeptID: data.HDeptID,
                HDeptName: data.部门,
                HCusID: data.HCusID,
                HCusName: data.客户,
                HEmpID: data.HEmpID,
                HEmpName: data.业务员,
                HCurID: data.HCurID,
                HCurName: data.币别,
                HExRate: data.汇率,
                HEarnestRate: data.定金比例,
                HBillSubType: data.HBillSubType,
                HManagerID: data.HManagerID,
                HManagerName: data.主管,
                HSellSID: data.HSellSID,
                HSellSName: data.销售方式,
                HSSID: data.HSSID,
                HSSName: data.结算方式,
                HSSDate: dayjs(data.结算日期).format("YYYY-MM-DD"),
                HPayCusID: data.HPayCusID,
                HPayCusName: data.结算方,
                HLinkMan: data.联系人,
                HExplanation: data.摘要,
                HLinkPhone: data.联系电话,
                HProjectID: data.HProjectID,
                HProjectNumber: data.项目编码,
                HProjectName: data.项目名称,
                HWHID: data.主仓库id,
                HWHName: data.主仓库,
                HProductType: data.产品类型,
                HCreditRating_Now: data.HCreditRating_Now,
                HRemark: data.表头备注,
                HMaker: data.制单人,
                HMakeDate:
                  data.制单人 == "" ? "" : dayjs(data.制单日期).format("YYYY-MM-DD"),
                HUpDater: data.修改人,
                HUpDateDate:
                  data.修改人 == "" ? "" : dayjs(data.修改日期).format("YYYY-MM-DD"),
                HChecker: data.审核人,
                HCheckDate:
                  data.审核人 == "" ? "" : dayjs(data.审核日期).format("YYYY-MM-DD"),
                HCloseMan: data.关闭人,
                HCloseDate:
                  data.关闭人 == "" ? "" : dayjs(data.关闭日期).format("YYYY-MM-DD"),
                HDeleteMan: data.作废人,
                HDeleteDate:
                  data.作废人 == "" ? "" : dayjs(data.作废日期).format("YYYY-MM-DD"),
                HChangeMan: data.变更人,
                HChangeDate:
                  data.变更人 == "" ? "" : dayjs(data.变更日期).format("YYYY-MM-DD"),
              },
            };
            if (this.copyType == 1) {
              this.getHBillNo();
              let date = new Date();
@@ -1181,12 +1185,16 @@
    //根据客户带出联系人、联系电话
    getCustomerByCusID(HCusID) {
      axios
        .get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
        .get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
          params: {
            HCusID: HCusID,
          },
        })
        .then((response) => {
          if (response.data.count == 0) {
            this.$modal.msgWarning(response.data.Message);
            return
          }
          this.form.联系人 = response.data.data[0].HLinkMan;
          this.form.联系电话 = response.data.data[0].HLinkPhone;
          // this.form = response.data.data[0]
@@ -1334,7 +1342,7 @@
      var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1205','${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) => {
@@ -1373,7 +1381,7 @@
                this.OperationType;
              axios({
                method: "post",
                url: this.baseURL + "/Kf_SellOutBill/SaveSellOutBillList",
                url: this.$baseUrl + "/Kf_SellOutBill/SaveSellOutBillList",
                data: {
                  msg: sMainSub,
                },
@@ -1403,7 +1411,7 @@
      var InterID = form.hmainid || form.HInterID;
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", {
        .get(this.$baseUrl + "/Kf_SellOutBill/AuditKf_SellOutBill", {
          params: {
            HInterID: InterID,
            IsAudit: num,