Просмотр исходного кода

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

caojunjie 4 лет назад
Родитель
Сommit
e6aee21182

+ 13 - 12
src/views/system/user/index.vue

@@ -227,18 +227,6 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
-              <el-input v-model="form.userName" placeholder="请输入用户名称" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
-              <el-input v-model="form.password" placeholder="请输入用户密码" type="password" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
             <el-form-item label="用户性别">
               <el-select v-model="form.sex" placeholder="请选择">
                 <el-option
@@ -291,12 +279,25 @@
           </el-col>
         </el-row>
         <el-row>
+          <el-col :span="12">
+            <el-form-item  label="用户名称" prop="userName">
+              <el-input v-model="form.userName" placeholder="请输入用户名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
+              <el-input v-model="form.password" placeholder="请输入用户密码" type="password" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="24">
             <el-form-item label="备注">
               <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>

+ 1 - 1
src/views/warehouseBusiness/agreement/index.vue

@@ -430,7 +430,7 @@
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
         <el-button type="danger" :disabled="disappear" @click="approvalRevocation" v-if="form.fBillstatus === '4'">撤销审批</el-button>
         <el-button type="info" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
-        <el-button type="primary" @click="submitForm" :disabled="notChange">确 定</el-button>
+        <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
       </div>

+ 107 - 137
src/views/warehouseBusiness/inStock/index.vue

@@ -2241,7 +2241,7 @@
           </tr>
           <tr>
             <td width="450" colspan="2" class="zzss">
-              货权方:{{ form.fCorpid }}
+              货权方:{{ form.fCorpidName }}
             </td>
             <td width="450" colspan="2" class="zzss">
               仓库:{{ form.fWarehouseid }}
@@ -3138,10 +3138,10 @@ export default {
         }
         for (let corp in this.fMblnoOptions) {
           if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
-            this.$set(this.form, "fCorpid", this.fMblnoOptions[corp].fName);
+            this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
           }
         }
-
+        console.log(JSON.stringify(this.form))
         for (let sorp in this.warehouseOptions) {
           if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
             this.$set(
@@ -3201,104 +3201,104 @@ export default {
       }
     },
     showEditDialog_sss() {
-          if (this.Printinglist.length > 0) {
-            for (let li in this.Printinglist) {
-              if (!this.Printinglist[li].fId) {
-                this.$message.error("请先保存!");
-                return false;
-              }
-              if (this.dataListSelection.length > 0) {
-                console.log(this.dataListSelection)
-                this.fTruckno = this.dataListSelection[0].fTruckno;
-                this.fCntrtype = this.dataListSelection[0].fCntrtype;
-                this.fGoodsids = this.dataListSelection[0].fGoodsids;
-                this.fDriverTel = this.dataListSelection[0].fDriverTel;
-                this.fPackagespecs = this.dataListSelection[0].fPackagespecs;
-                var date = new Date(this.dataListSelection[0].fBsdate);
-                var Y = date.getFullYear() + "-";
-                var M =
-                  (date.getMonth() + 1 < 10
-                    ? "0" + (date.getMonth() + 1)
-                    : date.getMonth() + 1) + "-";
-                var D =
-                  (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) +
-                  " ";
-                this.fBsdates = Y + M + D;
-              }
-              for (let list in this.goodsOptions) {
-                if (
-                  this.Printinglist[li].fGoodsid === this.goodsOptions[list].fId
-                ) {
-                  this.$set(
-                    this.Printinglist[li],
-                    "fGoodsids",
-                    this.goodsOptions[list].fName
-                  );
-                }
-              }
+      if (this.Printinglist.length > 0) {
+        for (let li in this.Printinglist) {
+          if (!this.Printinglist[li].fId) {
+            this.$message.error('请先保存!')
+            return false
+          }
+          if (this.dataListSelection.length > 0) {
+            console.log(this.dataListSelection)
+            this.fTruckno = this.dataListSelection[0].fTruckno
+            this.fCntrtype = this.dataListSelection[0].fCntrtype
+            this.fGoodsids = this.dataListSelection[0].fGoodsids
+            this.fDriverTel = this.dataListSelection[0].fDriverTel
+            this.fPackagespecs = this.dataListSelection[0].fPackagespecs
+            var date = new Date(this.dataListSelection[0].fBsdate)
+            var Y = date.getFullYear() + '-'
+            var M =
+              (date.getMonth() + 1 < 10
+                ? '0' + (date.getMonth() + 1)
+                : date.getMonth() + 1) + '-'
+            var D =
+              (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) +
+              ' '
+            this.fBsdates = Y + M + D
+          }
+          for (let list in this.goodsOptions) {
+            if (
+              this.Printinglist[li].fGoodsid === this.goodsOptions[list].fId
+            ) {
+              this.$set(
+                this.Printinglist[li],
+                'fGoodsids',
+                this.goodsOptions[list].fName
+              )
             }
-            if (this.Printinglist.length > 0) {
-              for (let warehouseCr in this.Printinglist) {
-                if (
-                  this.Printinglist[warehouseCr].fTruckno !=
-                  this.Printinglist[0].fTruckno
-                ) {
-                  this.$message.error("请选择车相同车号");
-                  return false;
-                }
-                if (
-                  this.Printinglist[warehouseCr].fDriverName !=
-                  this.Printinglist[0].fDriverName
-                ) {
-                  this.$message.error("请选择相同司机名");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fGoodsid) {
-                  this.$message.error("请选择品名");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fWarehouselocid) {
-                  this.$message.error("请选择库区");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fGrossweight) {
-                  this.$message.error("请选择入库毛重");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fNetweight) {
-                  this.$message.error("请选择入库净重");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fPackagespecs) {
-                  this.$message.error("请输入包装规格");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fMarks) {
-                  this.$message.error("请输入品牌");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fQty) {
-                  this.$message.error("请选择入库件数");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fDriverName) {
-                  this.$message.error("请输入司机姓名");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fDriverTel) {
-                  this.$message.error("请输入司机电话");
-                  return false;
-                }
-                if (!this.Printinglist[warehouseCr].fTruckno) {
-                  this.$message.error("请输入车号");
-                  return false;
-                }
-              }
-              this.editDialogVisible_sss = true;
+          }
+        }
+        if (this.Printinglist.length > 0) {
+          for (let warehouseCr in this.Printinglist) {
+            if (
+              this.Printinglist[warehouseCr].fTruckno !=
+              this.Printinglist[0].fTruckno
+            ) {
+              this.$message.error('请选择车相同车号')
+              return false
+            }
+            if (
+              this.Printinglist[warehouseCr].fDriverName !=
+              this.Printinglist[0].fDriverName
+            ) {
+              this.$message.error('请选择相同司机名')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fGoodsid) {
+              this.$message.error('请选择品名')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fWarehouselocid) {
+              this.$message.error('请选择库区')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fGrossweight) {
+              this.$message.error('请选择入库毛重')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fNetweight) {
+              this.$message.error('请选择入库净重')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fPackagespecs) {
+              this.$message.error('请输入包装规格')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fMarks) {
+              this.$message.error('请输入品牌')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fQty) {
+              this.$message.error('请选择入库件数')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fDriverName) {
+              this.$message.error('请输入司机姓名')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fDriverTel) {
+              this.$message.error('请输入司机电话')
+              return false
+            }
+            if (!this.Printinglist[warehouseCr].fTruckno) {
+              this.$message.error('请输入车号')
+              return false
             }
-          } else {
-            this.$message.error("请选择需要打印的明细!");
           }
+          this.editDialogVisible_sss = true
+        }
+      } else {
+        this.$message.error('请选择需要打印的明细!')
+      }
     },
     // 收款信息
     addCollection() {
@@ -4096,52 +4096,22 @@ export default {
             "tEnclosure",
             JSON.stringify(this.relevantAttachments)
           );
-
           for (let li in this.dataListSelection) {
             this.dataListSelection[li].fBillstatus = 20;
           }
           addJoblist(formData).then((response) => {
-            this.formBrowseStatus = true;
-            for (let li in this.dataListSelection) {
+            this.formBrowseStatus = true
+            let dataSelection = response.data.warehousebillsitems
+            for (let li in dataSelection) {
               for (let i in this.dataList) {
-                let fQty =
-                  this.dataList[i].fQty === this.dataListSelection[li].fQty;
-                let fBsdate =
-                  this.dataList[i].fBsdate ===
-                  this.dataListSelection[li].fBsdate;
-                let fGoodsid =
-                  this.dataList[i].fGoodsid ===
-                  this.dataListSelection[li].fGoodsid;
-                let fcntrtype =
-                  this.dataList[i].fcntrtype ===
-                  this.dataListSelection[li].fcntrtype;
-                let fNetweight =
-                  this.dataList[i].fNetweight ===
-                  this.dataListSelection[li].fNetweight;
-                let fGrossweight =
-                  this.dataList[i].fGrossweight ===
-                  this.dataListSelection[li].fGrossweight;
-                if (
-                  fBsdate &&
-                  fGoodsid &&
-                  fcntrtype &&
-                  fGrossweight &&
-                  fNetweight &&
-                  fQty
-                ) {
-                  this.$set(this.dataList[i], "fBillstatus", 20);
-                  for (let list in response.data.warehousebillsitems) {
-                    this.$set(
-                      this.dataList[i],
-                      "fSerialNumber",
-                      response.data.warehousebillsitems[list].fSerialNumber
-                    );
-                  }
+                if (dataSelection[li].fId === this.dataList[i].fId) {
+                  this.$set(this.dataList[i], 'fBillstatus', 20)
+                  this.$set(this.dataList[i], 'fSerialNumber', dataSelection[li].fSerialNumber)
                 }
               }
             }
-            this.$refs.tableList.clearSelection();
-          });
+            this.$refs.tableList.clearSelection()
+          })
         }
       });
     },
@@ -4243,7 +4213,7 @@ export default {
               for (let dt in dataSelection) {
                 for (let li in this.dataList) {
                   if (this.dataList[li].fId === dataSelection.fId) {
-                    this.$set(this.dataList[i], "fBillstatus", 30);
+                    this.$set(this.dataList[li], "fBillstatus", 30);
                   }
                 }
               }