Quellcode durchsuchen

前端检斤sdy

zhongtianhaoyuan vor 3 Jahren
Ursprung
Commit
573ef0b7d4

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -42,4 +42,6 @@ export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement
 export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
 //质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
+//检斤列表查看
+export const API_GET_INSPECT_GETWEIGHINGLETE = '/weighingManagement/selectWeighingManagement'
 

+ 4 - 1
src/model/houseSelfCollect/index.js

@@ -23,7 +23,8 @@ import {
   API_GET_INSPECT_GETINSPECTLOOKUNITPRICE,
   API_GET_INSPECT_GETINSPECTLOOKGOODS,
   API_POST_INSPECT_GETINSPECTEDIT,
-  API_POST_INSPECT_GETINSPECTDELETE
+  API_POST_INSPECT_GETINSPECTDELETE,
+  API_GET_INSPECT_GETWEIGHINGLETE
 
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
@@ -71,4 +72,6 @@ export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS
 export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, 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)
 

+ 25 - 35
src/views/houseSelfCollect/houseSelfCollectPrint.vue

@@ -1,62 +1,52 @@
 <!--打印-->
 <template>
   <div id="print" class="center">
-   <div class="title">{{name}}</div>
+    <div class="title">{{ name }}</div>
     <div @click="print">打印</div>
   </div>
 </template>
 <script>
-import {
-  // getList,
-} from '@/model/houseSelfCollect/index'
+import // getList,
+'@/model/houseSelfCollect/index'
 
 export default {
-
-  components: {
-
-  },
-  watch: {
-
-  },
+  components: {},
+  watch: {},
   data() {
     return {
-      tableData:{},
-      name:""
- 
+      tableData: {},
+      name: '',
     }
   },
-  activated() {
-
-  },
-  created(){
-    
-  // this.$route.query.type
-this.name = this.$route.query.name
+  activated() {},
+  created() {
+    // this.$route.query.type
+    this.name = this.$route.query.name
   },
   methods: {
-print(){
-        let newstr = document.getElementById('print').innerHTML
+    print() {
+      let newstr = document.getElementById('print').innerHTML
       let oldstr = document.body.innerHTML
       document.body.innerHTML = newstr
       window.print()
-            document.body.innerHTML = oldstr
-}
+      document.body.innerHTML = oldstr
+    },
   },
 }
 </script>
 <style lang="scss" scoped>
-.center{
+.center {
   width: 90%;
-  border: 1px solid #D8DCE6;
+  border: 1px solid #d8dce6;
   margin: 10px auto;
 }
-.title{
-    width: 325px;
-    font-size: 20px;
-    margin: 10px auto;
-    text-align: center;
-    color: #323233;
-    font-weight: 600;
-    border-bottom-style: double ;
+.title {
+  width: 325px;
+  font-size: 20px;
+  margin: 10px auto;
+  text-align: center;
+  color: #323233;
+  font-weight: 600;
+  border-bottom-style: double;
 }
 </style>

+ 36 - 24
src/views/houseSelfCollect/inspectInfo.vue

@@ -48,7 +48,6 @@
             </ws-form-item>
             <ws-form-item label="客户" span="1" prop="customerName">
               <ws-select
-                v-model="inspect.customerName"
                 placeholder="请输入客户"
                 class="typeselect"
                 @change="selectpackingMethod"
@@ -182,7 +181,8 @@
             </ws-form-item>
           </ws-info-table>
           <div style="text-align: right; color: #323233">
-            潮粮单价(元/公斤):{{ inspect.tidalGrainPrice ==null?"0": inspect.tidalGrainPrice}}
+            潮粮单价(元/公斤):{{ unitPrice}}
+            <!-- 潮粮单价(元/公斤):{{ inspect.tidalGrainPrice == null?"0": inspect.tidalGrainPrice}} -->
           </div>
           <div class="but">
             <el-button @click="cancel" v-if="this.types != 2" type="primary"
@@ -223,7 +223,7 @@ export default {
       // warehouseList: {},
       inspect: {},
       disabled: false,
-      types: '',
+      types: '1',
       information: '添加',
       goodnameList: [],
       gradeList: [],
@@ -231,14 +231,18 @@ export default {
       getbinNumberList: [],
       cangid: '', //仓库id
       warehouseName:'',
-      // calculation:''
+       unitPrice:0,
+       count:0,
+       cangNo:"",
     }
   },
   activated() {
     this.types = this.$route.query.type
     this.cangid = this.$route.query.cangid
-    this.warehouseName = this.$route.warehouseName
+    this.warehouseName = this.$route.query.warehouseName
     let id = this.$route.query.id
+    this.cangNo = this.$route.query.warehouseNo
+    this.count = Number(this.$route.query.count)+1 
     if (this.types == 2) {
       this.disabled = true
       this.information = '查看'
@@ -264,30 +268,33 @@ export default {
       return year + mouth + datetime
     },
     calculation() {
-      this.inspect.qualityNo = 'SGRK' + this.getdate()
+      let number ="000"+ this.count
+      number = number.substring(number.length - 4,number.length)
+      this.inspect.qualityNo = 'SGRK' + this.getdate()+this.cangNo+number //SGRK+8位时间+3位仓库编号+4位序列号
       // + this.verifyinit()
     },
     print() {
-      if(this.types == 1){
+      this.inspect.warehouseName = this.warehouseName
+          this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
+      if(this.types == null){
          this.$confirm('确定保存质检信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
       })
         .then(() => {
-          this.inspect.warehouseName = this.warehouseName
-          this.inspect.compId = sessionStorage.getItem('ws-pf_compId'),
+          
           inspectAdd(this.inspect)
             .toPromise()
             .then((response) => {
               this.$message.success('保存成功')
               // this.xx = true;
-              let newstr = document.getElementById('print').innerHTML
-              let oldstr = document.body.innerHTML
-              document.body.innerHTML = newstr
-              window.print()
-              document.body.innerHTML = oldstr
-              // window.location.reload()
+              // 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' })
             })
         })
@@ -308,11 +315,11 @@ export default {
             .then((response) => {
               this.$message.success('修改成功')
               // this.xx = true;
-              let newstr = document.getElementById('print').innerHTML
-              let oldstr = document.body.innerHTML
-              document.body.innerHTML = newstr
-              window.print()
-              document.body.innerHTML = oldstr
+              // 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' })
             })
@@ -329,7 +336,8 @@ export default {
     },
     waterContentChange() {
       //潮粮单价改变事件
-      getinspectLookUnitPrice({
+      if(this.inspect.goodsName != null && this.inspect.waterContent != null && this.inspect.grade != null){
+        getinspectLookUnitPrice({
         warehouseId: this.cangid,
         goodsName: this.inspect.goodsName,
         waterContent: this.inspect.waterContent,
@@ -338,14 +346,18 @@ export default {
         .toPromise()
         .then((response) => {
           this.inspect.tidalGrainPrice = response
+          this.unitPrice = response
         })
+      }
+      
     },
     //货名改变事件
     selectpackingMethod(e) {
-      let customers = e.split("(").split(")")[0]
+      let customers = e.split("(")
+      //  customers = customers[1].split(")")
+
       this.inspect.customerName = customers[0]
-      this.inspect.customerPhone = customers[1]
-     console.log()
+      this.inspect.customerPhone = customers[1].split(")")[0]
 
     },
     getList(ids) {

+ 9 - 5
src/views/houseSelfCollect/inspectionManagement.vue

@@ -9,7 +9,7 @@
         <ws-select
           v-model="warehouseName"
           placeholder=""
-          @change="selecttaskType"
+          @change="warehouseNameChange"
           :value="searchType"
         >
           <ws-option
@@ -120,6 +120,8 @@ export default {
       inspect: [],
       warehouseList: [],
       cangid: '', //仓库id
+      warehouseCount:"",
+      warehouseNo:"",
     }
   },
   activated() {
@@ -131,14 +133,13 @@ export default {
     },
     inspectInfo(row, index) {
       //添加,编辑,查看
-      console.log(row.id, 'id值')
       this.$router.push({
         path: 'inspectInfo',
-        query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName},
+        query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName,count:this.warehouseCount,warehouseNo:this.warehouseNo},
       })
     },
-    selecttaskType(e) {
-      console.log(e)
+    warehouseNameChange(e){
+      console.log(e,"eeeeeeeeeeeeeeeeee")
     },
     del(row) {
       //删除
@@ -188,9 +189,12 @@ export default {
               // valueKey: i,
               value: response[i].warehouseName,
               id: response[i].id,
+              count:response[i].count
             })
           }
           this.warehouseName = response[0].warehouseName
+          this.warehouseCount = response[0].count
+          this.warehouseNo = response[0].commonWarehouseNo
           this.cangid = response[0].id
         })
 

+ 63 - 59
src/views/houseSelfCollect/weighingManagement.vue

@@ -42,9 +42,9 @@
       </template>
     </BaseHeaderLayout>
     <el-table
-      :data="warehouseList"
+      :data="weighingList"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="weighingList"
       border
       height="780"
     >
@@ -71,14 +71,18 @@
       <el-table-column prop="contractNo" label="称重时间"></el-table-column>
       <el-table-column prop="contractNo" label="状态"></el-table-column>
       <el-table-column width="300" prop="contractNo1" label="操作">
-        <el-button @click="GrossWeight">毛重</el-button>
-        <el-button @click="tare">皮重</el-button>
+        <!-- <template slot-scope="scope"> -->
+          
+        
+        <el-button @click="weightCheck(1)">毛重</el-button>
+        <el-button @click="weightCheck(2)">皮重</el-button>
         <el-button @click="print">打印</el-button>
+        <!-- </template> -->
       </el-table-column>
     </el-table>
 
     <!-- 毛重检斤 -->
-    <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true">
+    <!-- <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true">
       <ws-form>
         <div class="title">毛重检斤</div>
         <ws-info-table>
@@ -110,9 +114,9 @@
           <el-button @click="commit">保存</el-button>
         </div>
       </ws-form>
-    </el-dialog>
+    </el-dialog> -->
     <!-- 皮重检斤 -->
-    <el-dialog width="40%" :visible.sync="paymentForm1" :append-to-body="true">
+    <!-- <el-dialog width="40%" :visible.sync="paymentForm1" :append-to-body="true">
       <ws-form>
         <div class="title">皮重检斤</div>
         <ws-info-table>
@@ -169,8 +173,8 @@
           <el-button @click="submit">保存</el-button>
         </div>
       </ws-form>
-    </el-dialog>
-    <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint>
+    </el-dialog> -->
+    <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
      <div style="text-align:center">
     <el-pagination
       @size-change="handleSizeChange"
@@ -185,11 +189,9 @@
   </div>
 </template>
 <script>
-import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
-import {} from '@/model/houseSelfCollect/index'
+import {getweighingList} from '@/model/houseSelfCollect/index'
 export default {
   components: {
-    houseSelfCollectPrint,
   },
   watch: {},
   data() {
@@ -201,11 +203,7 @@ export default {
       deptBudgetTotal: 0,
       paymentForm: false,
       paymentForm1: false,
-      warehouseList: [
-        {
-          contractNo: '56454',
-        },
-      ],
+      weighingList:[],
       searchKeyWord: '',
       searchType: [],
       searchTypeText: '',
@@ -213,54 +211,42 @@ export default {
       taskTypeList: [],
     }
   },
-  activated() {},
-  methods: {
-    GrossWeight() {
-      //毛重
-      this.paymentForm = true
-    },
-    tare() {
-      //皮重
-      this.paymentForm1 = true
+  activated() {
+    this.getList()
     },
+  methods: {
+    // GrossWeight() {
+    //   //毛重
+    //   this.paymentForm = true
+    // },
+    // tare() {
+    //   //皮重
+    //   this.paymentForm1 = true
+    // },
     selecttaskType() {
       //选择仓库改变方法
     },
-    Reacquire() {
-      //重新获取
-    },
-    commit() {
-      //毛重保存
-      this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {})
-        .catch(() => {
-          return false
-        })
-    },
-    submit() {//皮重保存
-       this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
+    weightCheck(num){
+       this.$router.push({
+        path: 'inspectInfo',
+        query: {tpyeNo:num,},
       })
-        .then(() => {})
-        .catch(() => {
-          return false
-        })
-    },
-    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' })
+
     },
+    // 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) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
@@ -271,6 +257,24 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
+    getList(){
+       getweighingList({ compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        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'))
+            })
+    }
   },
 }
 </script>

+ 49 - 16
src/views/houseSelfCollect/weightCheck.vue

@@ -82,7 +82,7 @@
                 placeholder="请输入囤位号"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                 disabled
               />
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="carNumber">
@@ -91,7 +91,7 @@
                 placeholder="请输入车牌号"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                 disabled
               />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
@@ -115,19 +115,22 @@
                 placeholder="请输入货名"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
-            <ws-form-item label="毛重(公斤)" span="1" prop="buckleWeightRatio">
+            <!-- <div class="formitem"> -->
+            <ws-form-item label="毛重(公斤)" span="1" prop="buckleWeightRatio" >
               <ws-input
                 v-model="inspect.buckleWeightRatio"
                 placeholder="请输入毛重"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                 disabled
               />
             </ws-form-item>
-             <ws-form-item label="皮重(公斤)" span="1" prop="buckleWeightRatio">
+            <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="请输入皮重)"
@@ -136,7 +139,10 @@
                 :disabled="disabled"
               />
             </ws-form-item>
-             <ws-form-item label="扣杂(公斤)" span="1" prop="buckleWeightRatio">
+            
+              <el-button type="primary">重新获取</el-button>
+              <div class="formItem">
+             <ws-form-item label="扣杂(公斤)" span="1" prop="buckleWeightRatio" >
               <ws-input
                 v-model="inspect.buckleWeightRatio"
                 placeholder="请输入扣杂"
@@ -145,23 +151,18 @@
                 :disabled="disabled"
               />
             </ws-form-item>
+            
             <ws-form-item label="净重(公斤)" span="1" prop="buckleWeightRatio">
               <ws-input
                 v-model="inspect.buckleWeightRatio"
                 placeholder="请输入净重"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                 disabled
               />
             </ws-form-item>
+            </div>
           </ws-info-table>
-           
-          
-          <div style="text-align: right; color: #323233">
-            潮粮单价(元/公斤):{{
-              inspect.tidalGrainPrice == null ? '0' : inspect.tidalGrainPrice
-            }}
-          </div>
           <div class="but">
             <el-button @click="cancel" v-if="this.types != 2" type="primary"
               >取消</el-button
@@ -188,7 +189,32 @@ export default {
     }
   },
   activated() {},
-  methods: {},
+  methods: {
+
+      submit() {//皮重保存
+       this.$confirm('确定保存检斤信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {})
+        .catch(() => {
+          return false
+        })
+    },
+        commit() {
+      //毛重保存
+      this.$confirm('确定保存检斤信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {})
+        .catch(() => {
+          return false
+        })
+    },
+  },
 }
 </script>
 <style lang="scss" scoped>
@@ -202,6 +228,13 @@ export default {
   width: 50%;
   border: none;
 }
+.formItem{
+  width: 100%;
+  display: inline;
+}
+//  .ws-info-table .widthChange {
+//    width: 51%;
+// }
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   width: 30%;
   text-align: center;