Browse Source

入库修改

tong 4 years ago
parent
commit
2d0b44f3ec

+ 49 - 37
src/views/warehouseBusiness/inStock/index.vue

@@ -267,7 +267,8 @@
       <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
       <el-table-column label="入库毛重" align="center" prop="fGrossweight" />
       <el-table-column label="净重" align="center" prop="fNetweight" />
-      <el-table-column width="100" label="状态" align="center" prop="fItemsStatus" />
+      <el-table-column width="100" label="入库状态" align="center" prop="fItemsStatus" />
+      <el-table-column width="100" label="费用状态" align="center" prop="fItemsStatus" />
       <el-table-column
         label="操作"
         align="center"
@@ -543,18 +544,21 @@
                   placeholder="唛头"
                 />
               </el-form-item>
+              
             </el-col>
-        </el-row>
-        <el-row>
-          <el-form-item label="备注" prop="remark">
-            <el-input
+            <el-col :span="15">
+              <el-form-item label="备注" prop="fMarks">
+                <el-input
               style="width: 100%"
               v-model="form.remark"
               type="textarea"
               :disabled="browseStatus"
               placeholder="请输入内容"
             />
-          </el-form-item>
+              </el-form-item>
+              
+            </el-col>
+            
         </el-row>
         <!--点击展开-->
         <el-button
@@ -762,7 +766,7 @@
         @selection-change="Selectinventory"
         show-summary
       >
-        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column  type="selection"  width="55" align="center" />
         <el-table-column label="序号" type="index" width="80">
         </el-table-column>
         <el-table-column
@@ -776,7 +780,7 @@
             <el-date-picker
               v-model="scope.row.fBsdate"
               style="width: 138px"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               type="date"
               value-format="timestamp"
               placeholder="入库日期"
@@ -795,7 +799,7 @@
             <el-select
               v-model="scope.row.fGoodsid"
               filterable
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               remote
               :remote-method="goodsRemoteMethod"
               placeholder="请选择品名"
@@ -821,7 +825,7 @@
               v-model="scope.row.fWarehouselocid"
               filterable
               remote
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               :remote-method="kqhouseRemoteMethod"
               placeholder="请选择库区"
             >
@@ -845,7 +849,7 @@
             <el-input
               v-model="scope.row.fCntrtype"
               placeholder="箱型"
-              :disabled="browseStatus"
+           :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -862,7 +866,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$4")'
               v-model="scope.row.fCntqty"
               placeholder="箱量"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -879,7 +883,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fPlangrossweight"
               placeholder="计划毛重"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -895,7 +899,7 @@
             <el-input
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fPlannetweight"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               placeholder="计划净重"
               show-word-limit
             />
@@ -913,7 +917,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fPlanvolumn"
               placeholder="尺码"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -930,7 +934,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fPlanqty"
               placeholder="件数"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -947,7 +951,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fGrossweight"
               placeholder="入库毛重"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -964,7 +968,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fNetweight"
               placeholder="入库净重"
-              :disabled="browseStatus"
+             :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -981,7 +985,7 @@
               oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fQty"
               placeholder="入库件数"
-              :disabled="browseStatus"
+             :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -997,7 +1001,7 @@
             <el-input
               v-model="scope.row.fPackagespecs"
               placeholder="包装规格"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -1014,7 +1018,7 @@
             <el-input
               v-model="scope.row.fCntrno"
               placeholder="箱号"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -1031,7 +1035,7 @@
               oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fGoodsval"
               placeholder="货值"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -1048,7 +1052,7 @@
               oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fTruckno"
               placeholder="车号"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -1064,7 +1068,7 @@
             <el-input
               v-model="scope.row.remark"
               placeholder="备注"
-              :disabled="browseStatus"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               show-word-limit
             />
           </template>
@@ -1077,12 +1081,14 @@
           label="状态"
         >
           <template slot-scope="scope">
-            <el-input
+            <span v-if="scope.row.fBillstatus === '6'">已入账</span>
+            <span v-else>未入账</span>
+            <!-- <el-input
               v-model="scope.row.fBillstatus"
               placeholder="状态"
               :disabled="browseStatus"
               show-word-limit
-            />
+            /> -->
           </template>
         </el-table-column>
         <el-table-column
@@ -1093,6 +1099,7 @@
         >
           <template slot-scope="scope">
             <el-button
+            :disabled="browseStatus || scope.row.fBillstatus === '6'"
               @click.native.prevent="deleteRow(scope.$index, dataList)"
               size="small"
               >移除</el-button
@@ -2372,12 +2379,12 @@ export default {
         this.warehousebillsList = response.rows;
         for (let li in this.warehousebillsList) {
           if(this.warehousebillsList[li].fItemsStatus === '6') {
-              this.warehousebillsList[li].fItemsStatus = "入账"
+              this.warehousebillsList[li].fItemsStatus = "全部入账"
               // this.browseStatus = true;
           } else if(this.warehousebillsList[li].fItemsStatus === '1') {
-            this.warehousebillsList[li].fItemsStatus = "未入账"
+            this.warehousebillsList[li].fItemsStatus = "录入"
           } else {
-            this.warehousebillsList[li].fItemsStatus = "未完成所有入账"
+            this.warehousebillsList[li].fItemsStatus = "部分入账"
           }
         }
         console.log(response.rows);
@@ -2587,11 +2594,11 @@ export default {
             "fBsdate",
             Date.parse(this.dataList[list].fBsdate)
           );
-         if(this.dataList[list].fBillstatus === '6'){
-           this.$set(this.dataList[list], "fBillstatus", '已入账');
-         } else {
-           this.$set(this.dataList[list], "fBillstatus", '未入账');
-         }
+        //  if(this.dataList[list].fBillstatus === '6'){
+        //    this.$set(this.dataList[list], "fBillstatus", '已入账');
+        //  } else {
+        //    this.$set(this.dataList[list], "fBillstatus", '未入账');
+        //  }
         }
         this.goodsOptions = response.data.goodsList;
         this.kqhouseOptions = response.data.warehouseAreas;
@@ -2826,7 +2833,7 @@ export default {
                 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', '7')
+                  this.$set(this.dataList[i], 'fBillstatus', '6')
                 }
               }
             }
@@ -2855,7 +2862,10 @@ export default {
             this.form.fPlanqty = this.fPlanqty;
             this.form.fGrossweight = this.fGrossweight;
             this.form.fQty = this.fQty;
-            this.form.fId = this.fid;
+            if(!this.form.fId) {
+               this.form.fId = this.fid;
+            }
+            
              console.log(this.form)
             let formData = new window.FormData();
             // 附件数据
@@ -2958,7 +2968,9 @@ export default {
             this.form.fPlanqty = this.fPlanqty;
             this.form.fGrossweight = this.fGrossweight;
             this.form.fQty = this.fQty;
-            this.form.fId = this.fid
+            if(!this.form.fId) {
+               this.form.fId = this.fid;
+            }
             console.log(this.form)
             console.log(this.amt);
             let formData = new window.FormData();

+ 16 - 3
src/views/warehouseBusiness/outStock/index.vue

@@ -574,6 +574,7 @@
           "
           >{{ detailsHidden ? "隐藏" : "展开" }}</el-button
         >
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
         <el-button type="success" prop="打印" @click="showEditDialog_ss"
           >收货单
         </el-button>
@@ -583,8 +584,7 @@
         <el-button type="info" prop="打印" @click="showEditDialog_sss"
           >作业单
         </el-button>
-        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
-        <el-button type="primary" @click="submitForm(6)">提交审核</el-button>
+        <el-button type="primary" @click="submitForm(6)">请核</el-button>
         <div v-if="detailsHidden">
           <el-row style="margin-top: 30px">
             <el-col :span="8">
@@ -2909,6 +2909,7 @@ export default {
           addWhgenleg(formData).then((response) => {
             console.log(response);
             this.fid = response.data;
+            console.log(response.data)
             this.creditStatus = true;
             this.msgSuccess("入账成功");
             for (let li in this.dataListSelection) {
@@ -3014,7 +3015,9 @@ export default {
             this.form.fPlanqty = this.fPlanqty;
             this.form.fGrossweight = this.fGrossweight;
             this.form.fQty = this.fQty;
-            this.form.fId = this.fid;
+            if(!this.form.fId) {
+               this.form.fId = this.fid;
+            }
             let formData = new window.FormData();
             // 附件数据
             formData.append("tWarehouseBills", JSON.stringify(this.form));
@@ -3102,6 +3105,16 @@ export default {
           }
           if (valid) {
             this.form.fBillstatus = status;
+            this.form.fNetweight = this.fNetweight;
+            this.form.fPlangrossweight = this.fPlangrossweight;
+            this.form.fPlannetweight = this.fPlannetweight;
+            this.form.fPlanvolumn = this.fPlanvolumn;
+            this.form.fPlanqty = this.fPlanqty;
+            this.form.fGrossweight = this.fGrossweight;
+            this.form.fQty = this.fQty;
+            if(!this.form.fId) {
+               this.form.fId = this.fid;
+            }
             let formData = new window.FormData();
             // 附件数据
             formData.append("tWarehouseBills", JSON.stringify(this.form));

+ 2 - 2
vue.config.js

@@ -34,8 +34,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.137.73:9010`,
-        // target: `http://engineering.echepei.com:9010/`,
+        // target: `http://192.168.137.73:9010`,
+        target: `http://engineering.echepei.com:9010/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''