浏览代码

提交出入库输入保留4位小数,以及增加车号筛选

caojunjie 4 年之前
父节点
当前提交
4045e0ca57

+ 8 - 0
src/api/basicdata/goods.js

@@ -8,6 +8,14 @@ export function listGoods(query) {
     params: query
   })
 }
+// 查询车号
+export function queryVehicle(query) {
+  return request({
+    url: '/warehouseBusiness/warehousebillsitems/getFBoxNo',
+    method: 'get',
+    params: query
+  })
+}
 
 // 查询商品详情详细
 export function getGoods(fId) {

+ 29 - 3
src/main.js

@@ -194,9 +194,7 @@ Vue.directive("input-limit", {
               e.target.dispatchEvent(new Event("input"))
             }
           }
-
-
-          if (binding.value == 2) {
+          if (binding.value == 4) {
             if (wins_0.test(e.target.value.toString().replace(/\d+\.(\d*)/, '$1'))) {
               remainder = true
             }
@@ -224,6 +222,34 @@ Vue.directive("input-limit", {
               e.target.dispatchEvent(new Event("input"))
             }
           }
+          if (binding.value == 2) {
+            if (wins_0.test(e.target.value.toString().replace(/\d+\.(\d*)/, '$1'))) {
+              remainder = true
+            }
+            if ((e.target.value.split('.')).length - 1 > 1) {
+              points = true
+            }
+            if (e.target.value.toString().split(".")[1] != undefined) {
+              if (e.target.value.toString().split(".")[1].length > 4) {
+                lengths = true
+              }
+            }
+            if (e.target.value.toString().indexOf(".") != -1) {
+              no_int = false
+            } else {
+              no_int = true
+            }
+            if (wins_1.test(e.target.value) || lengths || points || remainder) {
+              if (!no_int) {
+                e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
+                    '$#$', '.').substring(0, e.target.value.indexOf(
+                    ".") + 5)
+              } else {
+                e.target.value = e.target.value.replace(wins_0, "")
+              }
+              e.target.dispatchEvent(new Event("input"))
+            }
+          }
         }
       }, 0)
     })

+ 3 - 14
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -334,8 +334,8 @@
           <el-form-item label="计划毛重(kg)" prop="fPlangrossweight">
             <el-input
                 v-model="form.fPlangrossweight"
-                v-input-limit="2"
                 style="width: 80%"
+                v-input-limit="2"
                 placeholder="计划毛重"
                 maxlength="9"
                 :disabled="
@@ -540,21 +540,10 @@
           </div>
 
           <el-row>
-            <el-col :span="12">
-              <el-form-item label="备注" prop="remark">
-                <el-input
-                    style="width: 80%"
-                    v-model="form.remark"
-                    type="textarea"
-                    :disabled="browseStatus || form.warehouseStatus > 3"
-                    placeholder="请输入内容"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
+            <el-col :span="24">
               <el-form-item label="备注" prop="remark">
                 <el-input
-                    style="width: 80%"
+                    style="width: 91.5%"
                     v-model="form.remark"
                     type="textarea"
                     :disabled="browseStatus || form.warehouseStatus > 3"

+ 39 - 18
src/views/Warehousing/inStock/index.vue

@@ -56,20 +56,20 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="仓库" prop="fWarehouseid">
+            <el-form-item label="车号" prop="fWarehouseid">
               <el-select
-                v-model="queryParams.fWarehouseid"
+                v-model="queryParams.fTruckno"
                 clearable
                 filterable
-                placeholder="请选择仓库"
+                placeholder="请选择车号"
                 style="width: 200px"
                 @keyup.enter.native="handleQuery"
               >
                 <el-option
-                  v-for="(item, index) in warehouseOptions"
-                  :key="index.fId"
-                  :label="item.fName"
-                  :value="item.fId"
+                  v-for="(item, index) in fTrucknoList"
+                  :key="index"
+                  :label="item.fTruckno"
+                  :value="item.fTruckno"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -171,22 +171,39 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6">
-                <el-form-item label="经营单位" prop="fSbu">
+                <el-form-item label="仓库" prop="fWarehouseid">
                   <el-select
-                    v-model="queryParams.fSbu"
-                    clearable
-                    filterable
-                    placeholder="请输入关键词"
-                    style="width: 200px"
+                      v-model="queryParams.fWarehouseid"
+                      clearable
+                      filterable
+                      placeholder="请选择仓库"
+                      style="width: 200px"
+                      @keyup.enter.native="handleQuery"
                   >
                     <el-option
-                      v-for="(item, index) in fMblnoOptions"
-                      :key="index.fId"
-                      :label="item.fName"
-                      :value="item.fId"
+                        v-for="(item, index) in warehouseOptions"
+                        :key="index.fId"
+                        :label="item.fName"
+                        :value="item.fId"
                     ></el-option>
                   </el-select>
                 </el-form-item>
+<!--                <el-form-item label="经营单位" prop="fSbu">-->
+<!--                  <el-select-->
+<!--                    v-model="queryParams.fSbu"-->
+<!--                    clearable-->
+<!--                    filterable-->
+<!--                    placeholder="请输入关键词"-->
+<!--                    style="width: 200px"-->
+<!--                  >-->
+<!--                    <el-option-->
+<!--                      v-for="(item, index) in fMblnoOptions"-->
+<!--                      :key="index.fId"-->
+<!--                      :label="item.fName"-->
+<!--                      :value="item.fId"-->
+<!--                    ></el-option>-->
+<!--                  </el-select>-->
+<!--                </el-form-item>-->
               </el-col>
               <el-col :span="6">
                 <el-form-item label="贸易方式" prop="fTrademodeid">
@@ -516,7 +533,7 @@ import {
 } from "@/api/warehouseBusiness/warehouseInStock";
 import { listCorps } from "@/api/basicdata/corps";
 import { listWarehousesss } from "@/api/basicdata/warehouse";
-import { listGoods } from "@/api/basicdata/goods";
+import { listGoods ,queryVehicle} from "@/api/basicdata/goods";
 import { listUser, queryUserVal } from "@/api/system/user";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Cookies from "js-cookie";
@@ -727,6 +744,7 @@ export default {
       formId: null,
       ids: [],
       copyStatus: null,
+      fTrucknoList:[],
     };
   },
   // 使用子组件
@@ -740,6 +758,9 @@ export default {
     listGoods({ fStatus: 0, delFlag: 0 }).then((response) => {
       this.goodsOptions = response.rows;
     });
+    queryVehicle().then(res=>{
+      this.fTrucknoList = res.data
+    })
     listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
       this.warehouseOptions = response.rows;
     });

+ 58 - 19
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -422,10 +422,10 @@
             </el-col>
           </el-row>
           <el-row>
-            <el-col :span="24">
+            <el-col :span="12">
               <el-form-item label="备注" prop="remark">
                 <el-input
-                    style="width: 91.5%"
+                    style="width: 80%"
                     v-model="form.remark"
                     type="textarea"
                     :disabled="browseStatus || form.warehouseStatus > 3"
@@ -433,6 +433,17 @@
                 />
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="收费指示" prop="remark">
+                <el-input
+                    style="width: 80%"
+                    v-model="form.fRemarksFees"
+                    type="textarea"
+                    :disabled="browseStatus || form.warehouseStatus > 3"
+                    placeholder="请输入内容"
+                />
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-row>
             <el-col :offset="16" :span="6">
@@ -872,10 +883,10 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item command="d">标准出库单</el-dropdown-item>
-<!--                  <el-dropdown-item command="b">出库单</el-dropdown-item>-->
-<!--                  <el-dropdown-item command="c">理货单</el-dropdown-item>-->
-<!--                  <el-dropdown-item command="e">出库确认</el-dropdown-item>-->
-<!--                  <el-dropdown-item command="e">劳务确认</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="b">出库单</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="c">理货单</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="e">出库确认</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="e">劳务确认</el-dropdown-item>-->
                   <el-dropdown-item command="f">叉车出库单</el-dropdown-item>
                   <el-dropdown-item command="g">单车出库单</el-dropdown-item>
                   <el-dropdown-item command="h">装车存档出库单</el-dropdown-item>
@@ -974,6 +985,20 @@
                       placeholder="现箱号"
                   />
                 </span>
+                <span v-else-if="item.label =='fCartypeId'">
+                  <el-select
+                      style="width: 80%"
+                      v-model="scope.row.fCartypeId"
+                      :disabled="browseStatus || scope.row.fBillstatus == 40"
+                  >
+                    <el-option
+                        v-for="(dict, index) in cartypeId"
+                        :key="index.dictValue"
+                        :label="dict.dictLabel"
+                        :value="dict.dictValue"
+                    ></el-option>
+                </el-select>
+                </span>
                 <span v-else-if="item.label == 'fQty'">
                   <el-input
                       @change="qtyChange(scope.row)"
@@ -2525,7 +2550,8 @@
           style="box-shadow:none"
           width="70%">
         <section ref="print">
-          <p><span class="no-print">打印日期:</span><span style="padding-left: 100px">{{ new Date().toLocaleDateString().replace(/\//g, "-") }}</span></p>
+          <p><span class="no-print">打印日期:</span><span
+              style="padding-left: 100px">{{ new Date().toLocaleDateString().replace(/\//g, "-") }}</span></p>
           <table class="table" valign="center">
             <tr>
               <td style="width: 9%;"><span class="no-print">提 单 号</span></td>
@@ -2690,7 +2716,7 @@
               </td>
               <td colspan="2" v-else></td>
               <td colspan="2">身份证号</td>
-              <td colspan="2" v-if="Printinglist.length">{{Printinglist[0].fDriverIdCar}}</td>
+              <td colspan="2" v-if="Printinglist.length">{{ Printinglist[0].fDriverIdCar }}</td>
               <td colspan="2" v-else></td>
             </tr>
             <tr>
@@ -3625,7 +3651,7 @@ export default {
         orgStorageDate: null,
       },
       stockoi: null,
-      fSalesmanId:[],
+      fSalesmanId: [],
       drag: false,
       tableDate: [
         {
@@ -3847,8 +3873,15 @@ export default {
           name: "现箱号",
           checked: 0,
           width: 100,
+        }, {
+          surface: "31",
+          label: "fCartypeId",
+          name: "车辆类型",
+          checked: 0,
+          width: 100,
         }
       ],
+      cartypeId:[],
       setRowList: [],
       getRowList: [],
       allCheck: false,
@@ -4004,6 +4037,12 @@ export default {
     this.getDicts("sys_car_type").then((response) => {
       this.fCartypeOptions = response.data;
     });
+    this.getDicts("sys_car_type").then((response) => {
+      this.cartypeId = response.data;
+      this.cartypeId.forEach(item =>{
+        item.dictValue = Number(item.dictValue)
+      })
+    });
     this.getDicts("data_ifdamage_status").then((response) => {
       this.fIfdamageOptions = response.data;
     });
@@ -4456,9 +4495,9 @@ export default {
         this.$refs.ApprovalComments.init(form.fId, status, 120);
       });
     },
-    judgmentWarehouse(){
-      if (this.form.fMblno && this.form.fCorpid){
-        matchWarehouse({fMblno:this.form.fMblno,fCorpid:this.form.fCorpid}).then(res =>{
+    judgmentWarehouse() {
+      if (this.form.fMblno && this.form.fCorpid) {
+        matchWarehouse({fMblno: this.form.fMblno, fCorpid: this.form.fCorpid}).then(res => {
           this.warehouseSwitching = res.data
         })
       }
@@ -4743,7 +4782,7 @@ export default {
                 this.$set(this.form, "fCartype", this.form.fCartype.toString());
               }
               if (this.form.fTrademodeid) {
-                this.$set(this.form,"fTrademodeid",this.form.fTrademodeid.toString());
+                this.$set(this.form, "fTrademodeid", this.form.fTrademodeid.toString());
               }
               response.data.warehouseItem.map((e) => {
                 e.fBsdate = Date.parse(e.fBsdate);
@@ -4932,7 +4971,7 @@ export default {
                 fBillingDeadline: item.fBsdate,
                 fMblno: item.fMblno,
                 fGoodsid: item.fGoodsid,
-                fId:item.fId
+                fId: item.fId
               })
             } else {
               this.$message.error('第' + i + '条出库明细未出库');
@@ -5524,18 +5563,18 @@ export default {
           if (this.dataWithdrawList[item].fBillstatus === 40) {
             this.cancelDelivery = false
             this.deliveryConfirmation = true
-            for (let li in this.dataWithdrawList){
-              if (this.entryPrinting != 0?this.dataWithdrawList[li].fBillstatus === 10:this.dataWithdrawList[li].fBillstatus === 30){
+            for (let li in this.dataWithdrawList) {
+              if (this.entryPrinting != 0 ? this.dataWithdrawList[li].fBillstatus === 10 : this.dataWithdrawList[li].fBillstatus === 30) {
                 this.deliveryConfirmation = true
                 this.cancelDelivery = true
                 return
               }
             }
-          } else if (this.entryPrinting != 0?this.dataWithdrawList[item].fBillstatus === 10:this.dataWithdrawList[item].fBillstatus === 30){
+          } else if (this.entryPrinting != 0 ? this.dataWithdrawList[item].fBillstatus === 10 : this.dataWithdrawList[item].fBillstatus === 30) {
             this.deliveryConfirmation = false
             this.cancelDelivery = true
-            for (let li in this.dataWithdrawList){
-              if (this.dataWithdrawList[li].fBillstatus === 40){
+            for (let li in this.dataWithdrawList) {
+              if (this.dataWithdrawList[li].fBillstatus === 40) {
                 this.deliveryConfirmation = true
                 this.cancelDelivery = true
                 return

+ 45 - 24
src/views/Warehousing/outStock/index.vue

@@ -55,23 +55,23 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="仓库" prop="fWarehouseid">
-              <el-select
-                v-model="queryParams.fWarehouseid"
+            <el-form-item label="车号" prop="fWarehouseid">
+            <el-select
+                v-model="queryParams.fTruckno"
                 clearable
                 filterable
-                placeholder="请选择仓库"
+                placeholder="请选择车号"
                 style="width: 200px"
                 @keyup.enter.native="handleQuery"
-              >
-                <el-option
-                  v-for="(item, index) in warehouseOptions"
-                  :key="index.fId"
-                  :label="item.fName"
-                  :value="item.fId"
-                ></el-option>
-              </el-select>
-            </el-form-item>
+            >
+              <el-option
+                  v-for="(item, index) in fTrucknoList"
+                  :key="index"
+                  :label="item.fTruckno"
+                  :value="item.fTruckno"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           </el-col>
         </el-row>
         <el-collapse-transition>
@@ -170,22 +170,39 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6">
-                <el-form-item label="经营单位" prop="fSbu">
+                <el-form-item label="仓库" prop="fWarehouseid">
                   <el-select
-                    v-model="queryParams.fSbu"
-                    clearable
-                    filterable
-                    placeholder="请输入关键词"
-                    style="width: 200px"
+                      v-model="queryParams.fWarehouseid"
+                      clearable
+                      filterable
+                      placeholder="请选择仓库"
+                      style="width: 200px"
+                      @keyup.enter.native="handleQuery"
                   >
                     <el-option
-                      v-for="(item, index) in fMblnoOptions"
-                      :key="index.fId"
-                      :label="item.fName"
-                      :value="item.fId"
+                        v-for="(item, index) in warehouseOptions"
+                        :key="index.fId"
+                        :label="item.fName"
+                        :value="item.fId"
                     ></el-option>
                   </el-select>
                 </el-form-item>
+<!--                <el-form-item label="经营单位" prop="fSbu">-->
+<!--                  <el-select-->
+<!--                    v-model="queryParams.fSbu"-->
+<!--                    clearable-->
+<!--                    filterable-->
+<!--                    placeholder="请输入关键词"-->
+<!--                    style="width: 200px"-->
+<!--                  >-->
+<!--                    <el-option-->
+<!--                      v-for="(item, index) in fMblnoOptions"-->
+<!--                      :key="index.fId"-->
+<!--                      :label="item.fName"-->
+<!--                      :value="item.fId"-->
+<!--                    ></el-option>-->
+<!--                  </el-select>-->
+<!--                </el-form-item>-->
               </el-col>
               <el-col :span="6">
                 <el-form-item label="贸易方式" prop="fTrademodeid">
@@ -508,7 +525,7 @@ import {
 } from "@/api/warehouseBusiness/warehouseOutStock";
 import { listCorps } from "@/api/basicdata/corps";
 import { listWarehousesss } from "@/api/basicdata/warehouse";
-import { listGoods } from "@/api/basicdata/goods";
+import {listGoods, queryVehicle} from "@/api/basicdata/goods";
 import { listUser, queryUserVal } from "@/api/system/user";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Cookies from "js-cookie";
@@ -701,11 +718,15 @@ export default {
       formId: null,
       ids: [],
       copyStatus: null,
+      fTrucknoList:[],
     };
   },
   // 使用子组件
   components: { draggable, AddOrUpdate },
   created() {
+    queryVehicle().then(res=>{
+      this.fTrucknoList = res.data
+    })
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
     this.getDicts("data_trademodes").then((response) => {