Prechádzať zdrojové kódy

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

mxx 3 rokov pred
rodič
commit
e81d7c9c0f

+ 5 - 1
src/api/V2/houseSelfCollect/index.js

@@ -43,5 +43,9 @@ export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api
 //质检删除
 //质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
 //检斤列表查看
 //检斤列表查看
-export const API_GET_INSPECT_GETWEIGHINGLETE = '/weighingManagement/selectWeighingManagement'
+export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
+//皮重检斤保存
+export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
+//毛重重检斤保存
+export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
 
 

+ 8 - 3
src/model/houseSelfCollect/index.js

@@ -24,7 +24,9 @@ import {
   API_GET_INSPECT_GETINSPECTLOOKGOODS,
   API_GET_INSPECT_GETINSPECTLOOKGOODS,
   API_POST_INSPECT_GETINSPECTEDIT,
   API_POST_INSPECT_GETINSPECTEDIT,
   API_POST_INSPECT_GETINSPECTDELETE,
   API_POST_INSPECT_GETINSPECTDELETE,
-  API_GET_INSPECT_GETWEIGHINGLETE
+  API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
+  API_POST_WEIGHTCHECK_GROSSWEIGHT,
+  API_POST_WEIGHTCHECK_TARE
 
 
 } from '@/api/V2/houseSelfCollect'
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 //客户管理列表
@@ -73,5 +75,8 @@ export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorC
 //质检删除
 //质检删除
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
 //检斤列表查看
 //检斤列表查看
-export const getweighingList = appRx.get(API_GET_INSPECT_GETWEIGHINGLETE, errorCatcher, errorHandle, filter)
-
+export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, errorCatcher, errorHandle, filter)
+//皮重检斤保存
+export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
+//毛重检斤保存
+export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)

+ 71 - 65
src/views/houseSelfCollect/weighingManagement.vue

@@ -55,29 +55,34 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
-        prop="contractNo"
+        prop="number"
         width="120"
         width="120"
         label="编号"
         label="编号"
       ></el-table-column>
       ></el-table-column>
-      <el-table-column prop="contractNo" label="客户"></el-table-column>
-      <el-table-column prop="contractNo" label="车牌号"></el-table-column>
-      <el-table-column prop="contractNo" label="货名"></el-table-column>
+      <el-table-column prop="customer" label="客户"></el-table-column>
+      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+      <el-table-column prop="goodsName" label="货名"></el-table-column>
 
 
-      <el-table-column prop="contractNo" label="毛重(公斤)"></el-table-column>
-      <el-table-column prop="contractNo" label="皮重(公斤)"></el-table-column>
-      <el-table-column prop="contractNo" label="仓位号"></el-table-column>
-      <el-table-column prop="contractNo" label="囤位号"></el-table-column>
-      <el-table-column prop="contractNo" label="司称员"></el-table-column>
-      <el-table-column prop="contractNo" label="称重时间"></el-table-column>
-      <el-table-column prop="contractNo" label="状态"></el-table-column>
+      <el-table-column
+        prop="grossWeight"
+        label="毛重(公斤)"
+      ></el-table-column>
+      <el-table-column prop="tare" label="皮重(公斤)"></el-table-column>
+      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      <el-table-column prop="storageNumber" label="囤位号"></el-table-column>
+      <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
+      <el-table-column
+        prop="suqualityTestingDate"
+        label="称重时间"
+      ></el-table-column>
+      <el-table-column prop="status" label="状态"></el-table-column>
       <el-table-column width="300" prop="contractNo1" label="操作">
       <el-table-column width="300" prop="contractNo1" label="操作">
-        <!-- <template slot-scope="scope"> -->
-          
-        
-        <el-button @click="weightCheck(1)">毛重</el-button>
-        <el-button @click="weightCheck(2)">皮重</el-button>
+        <template slot-scope="scope">
+
+        <el-button @click="weightCheck(scope.row,1)">毛重</el-button>
+        <el-button @click="weightCheck(scope.row,2)">皮重</el-button>
         <el-button @click="print">打印</el-button>
         <el-button @click="print">打印</el-button>
-        <!-- </template> -->
+        </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
 
 
@@ -175,35 +180,35 @@
       </ws-form>
       </ws-form>
     </el-dialog> -->
     </el-dialog> -->
     <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
     <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
-     <div style="text-align:center">
-    <el-pagination
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      :current-page="currentPage"
-      :page-size="deptCircularPage.pageSize"
-      layout="total, sizes, prev, pager, next, jumper"
-      :total="deptBudgetTotal"
-    >
-    </el-pagination>
+    <div style="text-align: center">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import {getweighingList} from '@/model/houseSelfCollect/index'
+import { getweighingList } from '@/model/houseSelfCollect/index'
+
 export default {
 export default {
-  components: {
-  },
+  components: {},
   watch: {},
   watch: {},
   data() {
   data() {
     return {
     return {
-       //分页
+      //分页
       currentPage: 1,
       currentPage: 1,
       pageSize: 10,
       pageSize: 10,
-      deptCircularPage:{},
+      deptCircularPage: {},
       deptBudgetTotal: 0,
       deptBudgetTotal: 0,
       paymentForm: false,
       paymentForm: false,
       paymentForm1: false,
       paymentForm1: false,
-      weighingList:[],
+      weighingList: [],
       searchKeyWord: '',
       searchKeyWord: '',
       searchType: [],
       searchType: [],
       searchTypeText: '',
       searchTypeText: '',
@@ -213,7 +218,7 @@ export default {
   },
   },
   activated() {
   activated() {
     this.getList()
     this.getList()
-    },
+  },
   methods: {
   methods: {
     // GrossWeight() {
     // GrossWeight() {
     //   //毛重
     //   //毛重
@@ -226,28 +231,26 @@ export default {
     selecttaskType() {
     selecttaskType() {
       //选择仓库改变方法
       //选择仓库改变方法
     },
     },
-    weightCheck(num){
-       this.$router.push({
-        path: 'inspectInfo',
-        query: {tpyeNo:num,},
+    weightCheck(row,num) {
+      this.$router.push({
+        path: 'weightCheck',
+        query: { tpyeNo: num ,number:row.number,binNumber:row.binNumber,customer:row.customer,storageNumber:row.storageNumber,carNumber:row.carNumber,goodsName:row.goodsName,grossWeight:row.grossWeight,tare:row.tare,netWeight:row.netWeight,relationId:row.relationId},
       })
       })
-
     },
     },
     // Reacquire() {
     // Reacquire() {
     //   //重新获取
     //   //重新获取
     // },
     // },
 
 
-  
-    // print() {
-    //   let newstr = document.getElementById('print').innerHTML
-    //   let oldstr = document.body.innerHTML
-    //   document.body.innerHTML = newstr
-    //   window.print()
-    //   document.body.innerHTML = oldstr
-    //   // window.location.reload()
-    //   this.$router.push({ path: 'paymentManagement' })
-    // },
-     handleSizeChange(val) {
+    print() {
+      let newstr = document.getElementById('print').innerHTML
+      let oldstr = document.body.innerHTML
+      document.body.innerHTML = newstr
+      window.print()
+      document.body.innerHTML = oldstr
+      // window.location.reload()
+      this.$router.push({ path: 'paymentManagement' })
+    },
+    handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       console.log(`每页 ${val} 条`)
       this.pageSize = val
       this.pageSize = val
       this.getList()
       this.getList()
@@ -257,24 +260,27 @@ export default {
       console.log(`当前页: ${val}`)
       console.log(`当前页: ${val}`)
       this.getList()
       this.getList()
     },
     },
-    getList(){
-       getweighingList({ compId: sessionStorage.getItem('ws-pf_compId'),
+    getList() {
+      getweighingList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
         searchKeyWord: this.searchKeyWord,
         searchKeyWord: this.searchKeyWord,
-        warehouseName: this.warehouseName, })
-            .toPromise()
-            .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '删除成功',
-              })
-              this.getList()
-            })
-            .catch((response) => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            })
-    }
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          // this.$notify.success({
+          //   title: '成功',
+          //   message: '删除成功',
+          // })
+          this.weighingList = response.records 
+          
+        })
+        .catch((response) => {
+          // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+        })
+    },
   },
   },
 }
 }
 </script>
 </script>

+ 134 - 94
src/views/houseSelfCollect/weightCheck.vue

@@ -21,9 +21,9 @@
         <div style="width: 50%; margin: 0 auto">
         <div style="width: 50%; margin: 0 auto">
           <div class="title">基本信息</div>
           <div class="title">基本信息</div>
           <ws-info-table>
           <ws-info-table>
-            <ws-form-item label="编号" span="1" prop="qualityNo">
+            <ws-form-item label="编号" span="1" prop="number">
               <ws-input
               <ws-input
-                v-model="inspect.qualityNo"
+                v-model="weighingList.number"
                 placeholder="请输入编号"
                 placeholder="请输入编号"
                 maxlength="100"
                 maxlength="100"
                 disabled
                 disabled
@@ -31,87 +31,44 @@
               />
               />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="仓位号" span="1" prop="binNumber">
             <ws-form-item label="仓位号" span="1" prop="binNumber">
-              <!-- <ws-select
-                v-model="inspect.binNumber"
-                placeholder="请输入仓位号"
-                class="typeselect"
-                @change="selectpackingMethod"
-                :disabled="disabled"
-              >
-                <ws-option
-                  v-for="item in getbinNumberList"
-                  :key="item.value"
-                  :label="item.value"
-                  :value="item.value"
-                />
-              </ws-select> -->
-               <ws-input
-                v-model="inspect.binNumber"
+              <ws-input
+                v-model="weighingList.binNumber"
                 placeholder="请输入仓位号"
                 placeholder="请输入仓位号"
                 maxlength="100"
                 maxlength="100"
                 disabled
                 disabled
                 size="small"
                 size="small"
               />
               />
             </ws-form-item>
             </ws-form-item>
-            <ws-form-item label="客户" span="1" prop="customerName">
-              <!-- <ws-select
-                v-model="inspect.customerName"
-                placeholder="请输入客户"
-                class="typeselect"
-                @change="selectpackingMethod"
-                :disabled="disabled"
-              >
-                <ws-option
-                  v-for="item in customerList"
-                  :key="item.valueKey"
-                  :label="item.value"
-                  :value="item.value"
-                />
-              </ws-select> -->
-               <ws-input
-                v-model="inspect.customerName"
+            <ws-form-item label="客户" span="1" prop="customer">
+              <ws-input
+                v-model="weighingList.customer"
                 placeholder="请输入客户"
                 placeholder="请输入客户"
                 maxlength="100"
                 maxlength="100"
                 disabled
                 disabled
                 size="small"
                 size="small"
               />
               />
             </ws-form-item>
             </ws-form-item>
-            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+            <ws-form-item label="囤位号" span="1" prop="storageNumber">
               <ws-input
               <ws-input
-                v-model="inspect.storageTagNo"
+                v-model="weighingList.storageNumber"
                 placeholder="请输入囤位号"
                 placeholder="请输入囤位号"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
-                 disabled
+                disabled
               />
               />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="carNumber">
             <ws-form-item label="车牌号" span="1" prop="carNumber">
               <ws-input
               <ws-input
-                v-model="inspect.carNumber"
+                v-model="weighingList.carNumber"
                 placeholder="请输入车牌号"
                 placeholder="请输入车牌号"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
-                 disabled
+                disabled
               />
               />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
             <ws-form-item label="货名" span="1" prop="goodsName">
-              <!-- <ws-select
-                v-model="inspect.goodsName"
-                placeholder=""
-                class="typeselect"
-                :disabled="disabled"
-                @change="waterContentChange"
-              >
-                <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.goodsNameKey"
-                  :label="item.goodsName"
-                  :value="item.goodsName"
-                />
-              </ws-select> -->
-
               <ws-input
               <ws-input
-                v-model="inspect.goodsName"
+                v-model="weighingList.goodsName"
                 placeholder="请输入货名"
                 placeholder="请输入货名"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
@@ -119,48 +76,66 @@
               />
               />
             </ws-form-item>
             </ws-form-item>
             <!-- <div class="formitem"> -->
             <!-- <div class="formitem"> -->
-            <ws-form-item label="毛重(公斤)" span="1" prop="buckleWeightRatio" >
+            <ws-form-item
+              label="毛重(公斤)"
+              span="1"
+              prop="grossWeight"
+            >
               <ws-input
               <ws-input
-                v-model="inspect.buckleWeightRatio"
+                v-model="weighingList.grossWeight"
                 placeholder="请输入毛重"
                 placeholder="请输入毛重"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
-                 disabled
+               
               />
               />
             </ws-form-item>
             </ws-form-item>
             <el-button type="primary">重新获取</el-button>
             <el-button type="primary">重新获取</el-button>
-            <!-- <div style="width:100%"> -->
-             <ws-form-item label="皮重(公斤)" span="1" prop="buckleWeightRatio" >
-              <ws-input
-                v-model="inspect.buckleWeightRatio"
-                placeholder="请输入皮重)"
-                maxlength="100"
-                size="small"
-                :disabled="disabled"
-              />
-            </ws-form-item>
-            
-              <el-button type="primary">重新获取</el-button>
-              <div class="formItem">
-             <ws-form-item label="扣杂(公斤)" span="1" prop="buckleWeightRatio" >
+            <ws-form-item
+              label="皮重(公斤)"
+              span="1"
+              prop="tare"
+              v-if="this.tpyeNo == 2"
+            >
               <ws-input
               <ws-input
-                v-model="inspect.buckleWeightRatio"
-                placeholder="请输入扣杂"
+                v-model="weighingList.tare"
+                placeholder="请输入皮重"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
                 :disabled="disabled"
                 :disabled="disabled"
               />
               />
             </ws-form-item>
             </ws-form-item>
-            
-            <ws-form-item label="净重(公斤)" span="1" prop="buckleWeightRatio">
-              <ws-input
-                v-model="inspect.buckleWeightRatio"
-                placeholder="请输入净重"
-                maxlength="100"
-                size="small"
-                 disabled
-              />
-            </ws-form-item>
+
+            <el-button type="primary"  v-if="this.tpyeNo == 2">重新获取</el-button>
+            <div class="formItem">
+              <ws-form-item
+                label="扣杂(公斤)"
+                span="1"
+                prop="buckleWeightRatio"
+                 v-if="this.tpyeNo == 2"
+              >
+                <ws-input
+                  v-model="weighingList.buckleMiscellaneous"
+                  placeholder="请输入扣杂"
+                  maxlength="100"
+                  size="small"
+                  :disabled="disabled"
+                />
+              </ws-form-item>
+
+              <ws-form-item
+                label="净重(公斤)"
+                span="1"
+                prop="netWeight"
+                 v-if="this.tpyeNo == 2"
+              >
+                <ws-input
+                  v-model="weighingList.netWeight"
+                  placeholder="请输入净重"
+                  maxlength="100"
+                  size="small"
+                  disabled
+                />
+              </ws-form-item>
             </div>
             </div>
           </ws-info-table>
           </ws-info-table>
           <div class="but">
           <div class="but">
@@ -180,19 +155,41 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
+import { tare,grossWeight } from '@/model/houseSelfCollect/index'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-        inspect:{},
-        types:1,
-        information:"头部信息",
+      inspect: {},
+      types: 1,
+      information: '',
+      weighingList: {},
+      tpyeNo: '',
+      disabled:false,
+      relationId:"",
+    }
+  },
+  activated() {
+    this.tpyeNo = this.$route.query.tpyeNo
+    this.weighingList.number = this.$route.query.number
+    this.weighingList.binNumber = this.$route.query.binNumber
+    this.weighingList.customer = this.$route.query.customer
+    this.weighingList.storageNumber = this.$route.query.storageNumber
+    this.weighingList.carNumber = this.$route.query.carNumber
+    this.weighingList.goodsName = this.$route.query.goodsName
+    // this.weighingList.grossWeight = this.$route.query.grossWeight
+    // this.weighingList.tare = this.$route.query.tare
+    // this.weighingList.netWeight = this.$route.query.netWeight
+    this.relationId = this.$route.query.relationId
+    if(this.tpyeNo == 1){
+      this.information = "毛重"
+    }else if(this.tpyeNo == 2){
+      this.information = "皮重"
     }
     }
   },
   },
-  activated() {},
   methods: {
   methods: {
-
-      submit() {//皮重保存
-       this.$confirm('确定保存检斤信息?', '提示', {
+    submit() {
+      //皮重保存
+      this.$confirm('确定保存检斤信息?', '提示', {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning',
         type: 'warning',
@@ -202,7 +199,50 @@ export default {
           return false
           return false
         })
         })
     },
     },
-        commit() {
+     cancel() {
+      this.$router.push({ path: 'weighingManagement' })
+    },
+    print(){
+      this.$confirm('确定保存检斤信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          if(this.tpyeNo == 1){
+            this.weighingList.relationId = this.relationId
+            grossWeight(this.weighingList)
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '保存成功',
+              })
+              this.$router.go(-1) 
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+           }else if(this.tpyeNo == 2){
+              tare(this.weighingList)
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '保存成功',
+              })
+              this.$router.go(-1)
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+           }
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    commit() {
       //毛重保存
       //毛重保存
       this.$confirm('确定保存检斤信息?', '提示', {
       this.$confirm('确定保存检斤信息?', '提示', {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
@@ -228,7 +268,7 @@ export default {
   width: 50%;
   width: 50%;
   border: none;
   border: none;
 }
 }
-.formItem{
+.formItem {
   width: 100%;
   width: 100%;
   display: inline;
   display: inline;
 }
 }