dytyqx
14 小时以前 d1a4129ae92fc9ee10a41ef27c0accf37afa3f43
src/views/scMould/basicModeling/Gy_MouldFile.vue
@@ -95,9 +95,9 @@
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="单位" prop="HUnitName" v-show="isHide">
              <el-form-item label="单位" prop="HUnitName" v-show="isShow">
                <el-input v-model="form.HUnitName" placeholder="请输入单位" disabled>
                  <el-button slot="append" icon="el-icon-search"></el-button>
                  <el-button slot="append" icon="el-icon-search"  @click="openDataDialog(11)"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
@@ -105,6 +105,16 @@
              <el-form-item label="出厂日期" prop="HOutComDate" v-show="isHide">
                <el-date-picker v-model="form.HOutComDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="托体积" prop="HPackV" v-show="isShow">
                <el-input v-model="form.HPackV" placeholder="请输入托体积" />
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="托标准容器数量" prop="HStandardQtyForMouldInPack" v-show="isShow">
                <el-input v-model="form.HStandardQtyForMouldInPack" placeholder="请输入托标准容器数量" />
              </el-form-item>
            </el-col>
          </el-row>
@@ -505,6 +515,7 @@
      <GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" />
      <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" />
      <GyStockPlace @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyStockPlaceShow" />
      <GyUnit @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyUnitShow" />
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="deptClickSub">确 定</el-button>
        <el-button @click="deptClose">取 消</el-button>
@@ -527,11 +538,12 @@
import GySupplier from '@/views/basic/gy/gySupplier.vue'
import GyCustomer from '@/views/GyCustomer'
import GyStockPlace from '@/views/basic/gyStockPlace/gyStockPlace.vue'
import GyUnit from '@/views/basic/gyUnit/gyUnit.vue'
import moment from 'moment';
export default {
  name: 'Gy_MouldFile',
  components: { Dept, Warehouse, Material, RowSettings, GyEmployee, GySource, GySupplier, GyCustomer, GyStockPlace },
  components: { Dept, Warehouse, Material, RowSettings, GyEmployee, GySource, GySupplier, GyCustomer, GyStockPlace,GyUnit },
  props: {
    OperationType: { type: Number, },
    linterid: { type: Number, },
@@ -569,6 +581,7 @@
      gySupplierShow: false,
      gyCustomerShow: false,
      gyStockPlaceShow: false,
      gyUnitShow: false,
      deptform: {},//弹窗选中数据
      openData: false,//数据弹窗
      dialogTitle: '',
@@ -624,6 +637,7 @@
      form: {},
      // 表单校验
      rules: {
        HUnitName:[{required: true, message: "单位不能为空", trigger: "blur" }],
        // HSupName: [
        //   { required: true, message: "客户不能为空", trigger: "blur" }
        // ],
@@ -651,7 +665,7 @@
        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', {
          axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
            params: {
              "HInterID": data[i].hmainid
              , "HSubID": data[i].hsubid
@@ -770,7 +784,7 @@
    },
    //根据主内码与子内码获取源单销售订单数据
    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
@@ -841,7 +855,6 @@
          this.gySupplierShow = false
          this.openData = false
        } else if (num == 7) {
          console.log(deptRow)
          this.form.HCusName = deptRow.客户名称
          this.form.HCusID = deptRow.HItemID
          this.gyCustomerShow = false
@@ -856,6 +869,12 @@
          }
          this.gyStockPlaceShow = false
          this.openData = false
        } else if (num == 11){
           this.form.HUnitName = deptRow.计量单位名称;
            this.form.HUnitID = deptRow.HItemID;
          this.gyUnitShow= false
          this.openData = false
        }
      } else {
        this.$modal.msgError("请选择单条数据!");
@@ -901,7 +920,7 @@
    },
    //根据用户获取对应职员、部门、销售主管
    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]
@@ -993,6 +1012,8 @@
        HInComDate: moment(new Date()).format('YYYY-MM-DD'),
        DateTime: moment(new Date()).format('YYYY-MM-DD'),
        HCalibrationDate: moment(new Date()).format('YYYY-MM-DD'),
        HPackV:0,
        HStandardQtyForMouldInPack:0,
      }
      this.editData = []
      this.editBtData = []
@@ -1019,7 +1040,7 @@
      })
    },
    getHBillNo() {
      axios.get(this.baseURL + "/Web/GetMAXNum", {
      axios.get(this.$baseUrl + "/Web/GetMAXNum", {
        params: {
          HBillType: '3899'
        }
@@ -1033,7 +1054,7 @@
    },
    //获取对应的条码明细
    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) {
@@ -1048,7 +1069,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];
@@ -1063,7 +1084,7 @@
    handleUpdate() {
      this.reset()
      let rowHmainid = this.linterid
      axios.get(this.baseURL + "/Gy_Mould_Edit/xg", {
      axios.get(this.$baseUrl + "/Gy_Mould_Edit/xg", {
        params: { 'HInterID': rowHmainid }
      }).then(response => {
        console.log(response.data)
@@ -1143,12 +1164,14 @@
          // this.form.HMouldWidth = data.HMouldWidth
          // this.form.HMouldHeight = data.HMouldHeight
          // this.form.HMouldFoldHeight = data.HMouldFoldHeight
          this.form.HTransPackFlag = data.发货容器标记
          this.form.HSendPackFlag = data.周转容器标记
          this.form.HTransPackFlag = data.周转容器标记
          this.form.HSendPackFlag = data.发货容器标记
          this.form.HMouldFoldHeight = data.折叠高度
            this.form.HMouldLength = data.长
          this.form.HMouldLength = data.长
          this.form.HMouldWidth = data.宽
          this.form.HMouldHeight = data.高
          this.form.HPackV = data.托体积
          this.form.HStandardQtyForMouldInPack = data.托标准容器数量
          for (var i = 0; i < result.data.length; i++) {
            this.editData.push(
              {
@@ -1170,7 +1193,7 @@
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
      axios.get(this.baseURL + "/Gy_MouldFileMain/Gy_MouldFileSubDetai", {
      axios.get(this.$baseUrl + "/Gy_MouldFileMain/Gy_MouldFileSubDetai", {
        params: { 'HInterID': rowHmainid }
      }).then(response => {
        if (response.data.code == 1) {
@@ -1214,7 +1237,7 @@
    },
    //#region 计算-下次保养/校正日期
    calculateHNextMainDate(HInterID, HCycleUnit, HCheckCycle) {
      axios.get(this.baseURL + "/Gy_Mould_Edit/calculateHNextMainDate", {
      axios.get(this.$baseUrl + "/Gy_Mould_Edit/calculateHNextMainDate", {
        params: { 'HInterID': HInterID }
      }).then(response => {
        let d = response.data
@@ -1248,7 +1271,7 @@
    },
    //根据客户带出联系人、联系电话
    getCustomerByCusID(HCusID) {
      axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
      axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
        params: {
          HCusID: HCusID
        }
@@ -1424,7 +1447,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 => {
        if (response.data.count == 1) {
@@ -1471,7 +1494,7 @@
          console.log(oMain)
          axios({
            method: 'post',
            url: this.baseURL + url,
            url: this.$baseUrl + url,
            data: {
              'oMain': oMain
            },
@@ -1503,6 +1526,7 @@
      this.gySupplierShow = false
      this.gyCustomerShow = false
      this.gyStockPlaceShow = false
      this.gyUnitShow= false
    },
    //  打开数据列表弹窗
    openDataDialog(num, row) {
@@ -1543,6 +1567,10 @@
        this.dialogTitle = '仓位列表'
        this.gyStockPlaceShow = true
        this.openData = true
      } else if (num == 11) {
        this.dialogTitle = '单位列表'
        this.gyUnitShow = true
        this.openData = true
      }
    },
  }