修改库存调整,选择产品会修改列表所有产品的bug,新建出库单添加表单校验
4个文件已修改
47 ■■■■ 已修改文件
src/components/makepager/CommonFormTableView.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/inventoryAdjustment/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/AddOverviewDialog.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue
@@ -662,7 +662,16 @@
      } else {
        let selIndex = 0
        this.tableList.tableData.map((ite, index) => {
          if (ite.id === row.id) {
          // ite.id 是上架规则的, ite.productId是库存调整的
          if (ite.id === row.id&&ite.id!=undefined&&row.id!=undefined) {
            selIndex = index
            ite.productId = item.id
            ite.productName = item.name
            ite.categoryId = item.categoryId
            ite.productCategory = item.categoryName
            ite.amount = item.amount
            ite.unit = item.unit
          }else if(ite.productId===row.productId){
            selIndex = index
            ite.productId = item.id
            ite.productName = item.name
src/views/operate/inventoryAdjustment/index.vue
@@ -136,6 +136,7 @@
          this.pagerOptions.totalCount = res.total
        }
      })
    },
    // 操作输入
    inputContent(val, prop, row) {
@@ -316,7 +317,9 @@
    },
    // 选中产品方法
    selProductClick(value, item) {
      this.productId = item.productId
      if (value === "product") {
        this.productId = item.productId
      }
    },
    // 获取当前时间
    currentTime() {
src/views/overview/AddOverviewDialog.vue
@@ -183,7 +183,7 @@
            </div>
            <!-- 物流信息 -->
            <div v-if="activeName === 'two' && this.workType === 2">
              <el-form label-position="right" :model="shipmentsInfo" label-width="120px" size="mini"
              <el-form :rules="rules" ref="shipmentsInfo" label-position="right" :model="shipmentsInfo" label-width="120px" size="mini"
                style="margin-top: 20px;">
                <el-col :span="12">
                  <el-form-item label="承运商">
@@ -207,7 +207,7 @@
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="联系电话">
                  <el-form-item label="联系电话" prop="receiverPhone">
                    <el-input style="width: 90%;" :disabled="!showFooter"
                      v-model="editConfig.infomation.receiverPhone"></el-input>
                  </el-form-item>
@@ -220,13 +220,13 @@
                </el-col>
                <el-col :span="12">
                  <el-form-item label="重量">
                    <el-input style="width: 90%;" :disabled="!showFooter"
                    <el-input style="width: 90%;" :disabled="!showFooter" type="number"
                      v-model="editConfig.infomation.weight"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="物流重量">
                    <el-input style="width: 90%;" :disabled="!showFooter"
                    <el-input style="width: 90%;" :disabled="!showFooter" type="number"
                      v-model="editConfig.infomation.logisticWeight"></el-input>
                  </el-form-item>
                </el-col>
@@ -257,7 +257,7 @@
      <!-- 尾 -->
      <div slot="footer" class="dialog-footer">
        <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">保并提交审批</el-button> -->
        <el-button type="primary" size="small" @click="saveClick('form')" :disabled="!showFooter">保存</el-button>
        <el-button type="primary" size="small" @click="saveClick('form','shipmentsInfo')" :disabled="!showFooter">保存</el-button>
        <el-button size="small" @click="editConfig.visible = false">取消</el-button>
      </div>
    </el-dialog>
@@ -316,8 +316,18 @@
        operationDate: [{ required: true, message: "请选择日期", trigger: "change" }],
        toLocationId: [{ required: true, message: "请选择仓库位置", trigger: "change" }],
        fromLocationId: [{ required: true, message: "请选择源位置", trigger: "change" }],
        operationTypeId: [{ required: true, message: "请选择入库类型", trigger: "change" }]
      },
        operationTypeId: [{ required: true, message: "请选择入库类型", trigger: "change" }],
        receiverPhone: [
          {required: true, message: "请输入手机号", trigger: "change" },
          {
            pattern:
              /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
            message: "请输入正确的手机号",
            trigger: ["blur",'change' ],
          },
        ]
      },
      companyOptions: [], // 公司
      supplierOptions: [],//供应商
      clientOptions: [],//客户
@@ -356,7 +366,6 @@
    }
  },
  created() {
    localStorage.removeItem('pdfParams');
    this.getCompanyList()
    this.setStatusList()
    this.setTableForm()
@@ -527,8 +536,8 @@
      })
    },
    // 保存
    saveClick(formName) {
      this.$refs[formName].validate((valid) => {
    saveClick(formName,shipmentsInfo) {
      this.$refs[formName,shipmentsInfo].validate((valid) => {
        if (valid) {
          for (let i = 0; i < this.tableData.length; i++) {
            if (this.tableData[i].productName.length === 0) {
src/views/overview/OverviewListView.vue
@@ -234,7 +234,7 @@
    async getData() {
      await getOperation({
        number: this.keyword,
        operationTypeId: this.$route.params.id,
        operationTypeId: this.$route.params.id?this.$route.params.id:this.params.id,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize,
        status: this.params.status