zxz 3 years ago
parent
commit
8ea05bfabb

+ 17 - 5
src/api/V2/outboundManagement/index.js

@@ -9,18 +9,30 @@ export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'
 //检斤列表查看
 //检斤列表查看
 export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
 export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
 //皮重检斤保存
 //皮重检斤保存
-export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
+export const API_POST_WEIGHTCHECK_TARE = '/weighingManagement/api/editTare'
 //出库管理添加皮重检斤
 //出库管理添加皮重检斤
-export const API_POST_WEIGHTCHECK_ADDTARE= '/weighingManagement/api/addTare'
+export const API_POST_WEIGHTCHECK_ADDTARE = '/weighingManagement/api/addTare'
 //出库管理编辑皮重检斤
 //出库管理编辑皮重检斤
-export const API_POST_WEIGHTCHECK_EDITTAREOUT= '/weighingManagement/api/editTareOut'
+export const API_POST_WEIGHTCHECK_EDITTAREOUT = '/weighingManagement/api/editTareOut'
 //毛重检斤保存
 //毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
 //检斤仓位下拉
 //检斤仓位下拉
 export const API_GET_INSPECT_GETBINNUMBER = '/warehouseBaseInfo/getWarehouse'
 export const API_GET_INSPECT_GETBINNUMBER = '/warehouseBaseInfo/getWarehouse'
 //删除检斤信息
 //删除检斤信息
 export const API_POST_INSPECT_DELETEWEIGHING = '/weighingManagement/api/deleteWeightcheck'
 export const API_POST_INSPECT_DELETEWEIGHING = '/weighingManagement/api/deleteWeightcheck'
-//合同编号下拉
-export const API_GET_INSPECT_CONTRANCLIST= '/warehouseBaseInfo/selectContractNoList'
+//收款合同编号下拉
+export const API_GET_INSPECT_CONTRANCLIST = '/paymentManagement/selectContractNoList'
+//检斤合同编号下拉
+export const API_GET_INSPECT_CONTRANCLISTWEIGHING = '/warehouseBaseInfo/selectContractNoList'
 //检斤查看
 //检斤查看
 export const API_GET_WEIGHTCHECK = '/weighingManagement/getWeighingManagement'
 export const API_GET_WEIGHTCHECK = '/weighingManagement/getWeighingManagement'
+//收款管理列表
+export const API_GET_COLLECTION_LIST = '/paymentManagement/selectPaymentManagement'
+//收款查看
+export const API_GET_COLLECTION = '/paymentManagement/getInfo'
+// 收款
+export const API_POST_COLLECTION_MONEY = '/paymentManagement/api/collectMoney'
+// 编辑实际应收
+export const API_POST_COLLECTION_EDITCOLLECT = '/paymentManagement/api/editCollect'
+// 添加备注
+export const API_POST_COLLECTION_ADDREMARKS = '/paymentManagement/api/addRemarks'

+ 20 - 3
src/model/outboundManagement/index.js

@@ -14,7 +14,13 @@ import {
     API_GET_INSPECT_CONTRANCLIST,
     API_GET_INSPECT_CONTRANCLIST,
     API_POST_WEIGHTCHECK_ADDTARE,
     API_POST_WEIGHTCHECK_ADDTARE,
     API_POST_WEIGHTCHECK_EDITTAREOUT,
     API_POST_WEIGHTCHECK_EDITTAREOUT,
-    API_GET_WEIGHTCHECK
+    API_GET_WEIGHTCHECK,
+    API_GET_COLLECTION,
+    API_GET_COLLECTION_LIST,
+    API_POST_COLLECTION_EDITCOLLECT,
+    API_POST_COLLECTION_ADDREMARKS,
+    API_POST_COLLECTION_MONEY,
+    API_GET_INSPECT_CONTRANCLISTWEIGHING
 
 
 }   from '@/api/V2/outboundManagement'
 }   from '@/api/V2/outboundManagement'
 
 
@@ -40,8 +46,19 @@ export const tareEdit = appRx.post(API_POST_WEIGHTCHECK_EDITTAREOUT, errorCatche
 export const getbinNumber = appRx.get(API_GET_INSPECT_GETBINNUMBER, errorCatcher, errorHandle, filter)
 export const getbinNumber = appRx.get(API_GET_INSPECT_GETBINNUMBER, errorCatcher, errorHandle, filter)
 //删除检斤信息
 //删除检斤信息
 export const delelteWeighing = appRx.post(API_POST_INSPECT_DELETEWEIGHING, errorCatcher, errorHandle, filter)
 export const delelteWeighing = appRx.post(API_POST_INSPECT_DELETEWEIGHING, errorCatcher, errorHandle, filter)
-//合同编号下拉
+//收款合同编号下拉
 export const contractList = appRx.get(API_GET_INSPECT_CONTRANCLIST, errorCatcher, errorHandle, filter)
 export const contractList = appRx.get(API_GET_INSPECT_CONTRANCLIST, errorCatcher, errorHandle, filter)
+//检斤合同编号下拉
+export const contractListWeighing = appRx.get(API_GET_INSPECT_CONTRANCLISTWEIGHING, errorCatcher, errorHandle, filter)
 //检斤查看
 //检斤查看
 export const getweighing = appRx.get(API_GET_WEIGHTCHECK, errorCatcher, errorHandle, filter)
 export const getweighing = appRx.get(API_GET_WEIGHTCHECK, errorCatcher, errorHandle, filter)
-  
+//收款信息查看
+export const getcollectionexamine = appRx.get(API_GET_COLLECTION, errorCatcher, errorHandle, filter)
+//收款
+export const moneyCollection = appRx.post(API_POST_COLLECTION_MONEY, errorCatcher, errorHandle, filter)
+//收款管理列表
+export const getcollection = appRx.get(API_GET_COLLECTION_LIST, errorCatcher, errorHandle, filter)
+//编辑实际应收
+export const editcollect = appRx.post(API_POST_COLLECTION_EDITCOLLECT, errorCatcher, errorHandle, filter)
+//添加备注
+export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatcher, errorHandle, filter)

+ 247 - 126
src/views/outboundManagement/collectionManagement.vue

@@ -26,14 +26,14 @@
             class="findValue"
             class="findValue"
           >
           >
             <el-option
             <el-option
-              v-if="item.reportStatus"
+              v-if="item.listStatus"
               v-for="item in options"
               v-for="item in options"
               :key="item.constKey"
               :key="item.constKey"
-              :label="item.contractNo + '(' + item.reportStatus + ')'"
+              :label="item.contractNo + '(' + item.listStatus + ')'"
               :value="item.contractNo"
               :value="item.contractNo"
             />
             />
             <el-option
             <el-option
-              v-if="!item.reportStatus"
+              v-if="!item.listStatus"
               v-for="item in options"
               v-for="item in options"
               :key="item.constKey"
               :key="item.constKey"
               :label="item.contractNo"
               :label="item.contractNo"
@@ -44,9 +44,9 @@
       </template>
       </template>
     </BaseHeaderLayout>
     </BaseHeaderLayout>
     <el-table
     <el-table
-      :data="warehouseList"
+      :data="collectList"
       style="width: 100%; margin-top: 20px"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="collectList"
       border
       border
       height="780"
       height="780"
       @selection-change="handleSelectionChange"
       @selection-change="handleSelectionChange"
@@ -64,91 +64,88 @@
       </el-table-column>
       </el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="closingQuantity"
+        prop="carNo"
         label="车牌号"
         label="车牌号"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="transactionPrice"
+        prop="goodsName"
         label="货名"
         label="货名"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="amountIngPayable"
+        prop="grossWeight"
         label="毛重(公斤)"
         label="毛重(公斤)"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="amountEdPayable"
+        prop="tare"
         label="皮重(公斤)"
         label="皮重(公斤)"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="amountIngPayable"
+        prop="netWeight"
         label="净重(公斤)"
         label="净重(公斤)"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="closeRate"
+        prop="contractPrice"
         label="合同单价(元/公斤)"
         label="合同单价(元/公斤)"
         width="150"
         width="150"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
-        class="table_td"
-        prop="basisPrice"
-        label="计算应收(元)"
-      ></el-table-column>
-
-       <el-table-column
-        class="table_td"
-        prop="basis"
-        label="计算应收(元)"
-        width="100"
-      >
-        <template slot-scope="scope">
-          <div class="inputChenge">
-          <input
-            style="width: 60px"
-            v-model="scope.row.basis"
-            type="text"
-          />
-          </div>
-          <img
-            width="17"
-            height="18"
-            style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/edit.png"
-            @click="whether(scope.row)"
-            v-if="scope.row.identification == 'false'"
-            alt=""
-          />
-          <i
-            class="el-icon-check"
-            style="line-height: 29px; margin-left: 10px"
-            @click="varietyClick(scope.row)"
-            v-if="scope.row.identification == 'true'"
-          ></i>
-        </template>
-      </el-table-column>
-
+         width='150'
+          class="table_td"
+          prop="calculationCollectable"
+          label="计算应收(元)"
+        ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="basisPrice"
+        width='200'
+        prop="actualCollectionment"
         label="实际应收(元)"
         label="实际应收(元)"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+            <div class="inputChenge">
+              <!-- readonly -->
+              <el-input
+                v-model="scope.row.actualCollectionment"
+                v-if="scope.row.identification == 'true'"
+              ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.actualCollectionment }}
+              </div>
+            </div>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="whether(scope.row)"
+              v-if="scope.row.identification == 'false'"
+              alt=""
+            />
+            <i
+              class="el-icon-check"
+              style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'"
+              @click="varietyClick(scope.row)"
+            ></i>
+            <!-- <div>—</div> -->
+          </template></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="collectDate"
+        prop="amountEdCollectionable"
         label="已收款(元)"
         label="已收款(元)"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="collectionIngPayable"
+        prop="collectionDate"
         label="收款时间"
         label="收款时间"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
-        prop="collectionEdPayable"
+        prop="status"
         label="状态"
         label="状态"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column
@@ -156,8 +153,9 @@
         prop="collectionEdPayable"
         prop="collectionEdPayable"
         label="操作"
         label="操作"
         width="200"
         width="200"
-      >
-        <el-button @click="collectment(2)">查看</el-button>
+      ><template scope="scope">
+        <el-button @click="collectment(2,scope.row)">查看</el-button>
+        </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
     <!-- 收款 -->
     <!-- 收款 -->
@@ -185,7 +183,7 @@
         </el-form-item>
         </el-form-item>
         <el-form-item
         <el-form-item
           label="收款日期"
           label="收款日期"
-          prop="submissionDate"
+          prop="collectionDate"
           :label-width="formLabelWidth"
           :label-width="formLabelWidth"
           class="deal"
           class="deal"
         >
         >
@@ -218,7 +216,6 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <!--备注-->
     <!--备注-->
-
     <el-dialog
     <el-dialog
       width="25%"
       width="25%"
       title="备注"
       title="备注"
@@ -237,10 +234,9 @@
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button @click="collectForm1 = false">取 消</el-button>
         <el-button @click="collectForm1 = false">取 消</el-button>
-        <el-button type="primary" @click="collectSubmit1">保存</el-button>
+        <el-button type="primary" @click="adoptRemarks()">保存</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
-
     <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
     <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
     <div style="text-align: center">
     <div style="text-align: center">
       <el-pagination
       <el-pagination
@@ -256,7 +252,13 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {
+  getcollection,
+  editcollect,
+  remarksAdd,
+  moneyCollection,
+  contractList
+} from '@/model/outboundManagement/index'
 export default {
 export default {
   watch: {},
   watch: {},
   data() {
   data() {
@@ -264,6 +266,7 @@ export default {
       //分页
       //分页
       currentPage: 1,
       currentPage: 1,
       pageSize: 10,
       pageSize: 10,
+      allmoney1:0,
       deptCircularPage: {},
       deptCircularPage: {},
       deptBudgetTotal: 0,
       deptBudgetTotal: 0,
       warehouseList: [
       warehouseList: [
@@ -271,10 +274,31 @@ export default {
           collectionEdPayable: '快收款',
           collectionEdPayable: '快收款',
         },
         },
       ],
       ],
+      options:[],
+      contractNoList:[],
+      contractNo: '全部合同',
       dialogVisible: false,
       dialogVisible: false,
       form: {},
       form: {},
+      compId: sessionStorage.getItem('ws-pf_compId'),
       collectForm: false,
       collectForm: false,
       collectForm1: false,
       collectForm1: false,
+      managementType : 3,
+      remarks:'',
+       money: 0,
+      //  id:'',
+      collectmoney: 0,
+      paymentManagementList:[],
+      collectionManagement:{
+          paymentManagementList:[],
+          remarks:'',
+      },
+      collectList:[],
+      collectionDate: '',
+      collectionScreenshot: '',
+      amountEdCollectionable:'',
+      actualCollectionment:'',
+      // collectDate: '',
+      calculationCollectable:'',
       taskTypeList: ['一号库'],
       taskTypeList: ['一号库'],
       searchType: '',
       searchType: '',
       searchTypeText: '',
       searchTypeText: '',
@@ -284,53 +308,55 @@ export default {
       modification: [],
       modification: [],
     }
     }
   },
   },
-  activated() {},
+  activated() {
+    this.getList()
+  },
   methods: {
   methods: {
     contractchange(e) {
     contractchange(e) {
       this.contractNo = e
       this.contractNo = e
       this.getList()
       this.getList()
     },
     },
-        //修改基差
+    //修改实际应收
     varietyClick(row) {
     varietyClick(row) {
-    //   if (row.basis) {
-    //     if (isNaN(row.basis)) {
-    //       this.$message({
-    //         message: '基差非数字!',
-    //         type: 'warning',
-    //       })
-    //       return
-    //     }
-    //   }
-    //   if (
-    //     (row.basis&&
-    //       String(row.basis).indexOf('.') != -1 &&
-    //       String(row.basis).length -
-    //         (String(row.basis).indexOf('.') + 1) >
-    //         2) ||
-    //     row.basis > 100000 ||
-    //     row.basis < -100000
-    //   ) {
-    //     this.$message({
-    //       message: '基差输入错误',
-    //       type: 'warning',
-    //     })
-    //     return
-    //   }
-    //   if (!String(row.basis)) {
-    //     this.$message({
-    //       message: '基差不能为空!',
-    //       type: 'warning',
-    //     })
-    //     return
-    //   }
-      this.$confirm(`确定要修改应收?`, {
+       if (
+        row.actualCollectionment < 0 ||
+        row.actualCollectionment > 100000 ||
+        (String(row.actualCollectionment).indexOf('.') != -1 &&
+          String(row.actualCollectionment).length -
+            (String(row.actualCollectionment).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (row.actualCollectionment) {
+        if (isNaN(row.actualCollectionment)) {
+          this.$message({
+            message: '金额非数字!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (!row.actualCollectionment) {
+        this.$message({
+          message: '金额不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定要修改实际应收?`, {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning',
         type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
-          editCollect({
-            basis: row.basis,
+          editcollect({
+            actualCollectionment: row.actualCollectionment,
+            amountNotCollectable:row.actualCollectionment-row.amountEdCollectionable,
             id: row.id,
             id: row.id,
           })
           })
             .toPromise()
             .toPromise()
@@ -350,46 +376,123 @@ export default {
     whether(row) {
     whether(row) {
       row.identification = 'true'
       row.identification = 'true'
     },
     },
-    collectment(index) {
-      this.$router.push({ path: 'collectionment', query: { type: index } })
+    // ,relationId :row.relationId
+    collectment(index,row) {
+      this.$router.push({ path: 'collectionment', 
+      query: { 
+      type: index, 
+      id: row.id ,
+      relationId :row.relationId,
+      compId: sessionStorage.getItem('ws-pf_compId')} })
+      // this.$router.push({ path: 'settlement', query: { type: index,id: row.id,waterMin:data1.waterMin} })
     },
     },
     collect() {
     collect() {
+       this.allmoney1=0
       if (this.modification.length == 0) {
       if (this.modification.length == 0) {
-        this.$message.warning('请选择要收款的条目')
+        this.$message.warning('请选择一条要收款的条目')
       } else {
       } else {
+        for (var i = 0; i < this.modification.length; i++) {
+          this.allmoney1 += 
+          // this.modification[i].amountNotCollectable
+          this.modification[i].actualCollectionment - this.modification[i].amountEdPayable
+        }
         this.collectForm = true
         this.collectForm = true
       }
       }
     },
     },
     collectSubmit() {
     collectSubmit() {
-      this.$confirm('确定提交收款信息?', '提示', {
-        confirmButtonText: '确定',
+     
+      this.$confirm(`确定提交收款信息?`, {
         cancelButtonText: '取消',
         cancelButtonText: '取消',
+        confirmButtonText: '确定',
         type: 'warning',
         type: 'warning',
-      })
-        .then(() => {})
-        .catch(() => {
-          return false
+      }).then(() => {
+        moneyCollection({
+          paymentManagementList: this.modification,
+          money: this.collectmoney,
+          collectionDate: this.collectionDate,
+          collectionScreenshot: this.collectionScreenshot,
         })
         })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('收款成功')
+            this.collectmoney=''
+            this.collectionDate=''
+            this.collectionScreenshot=''
+            this.collectForm = false
+            this.getList()
+          })
+      })
     },
     },
-    collectSubmit1() {
-      this.$confirm('确定保存备注信息?', '提示', {
+    //添加备注信息
+    adopt() {
+      this.remarks = this.remarks
+      this.paymentManagementList = this.collectList[0].paymentManagementList
+      if (this.modification.length == 0) {
+        this.$message.warning('请选择要备注的条目')
+      } else {
+        this.collectForm1 = true
+      }
+    },
+    adoptRemarks() {
+      this.collectionManagement.remarks = this.remarks
+      this.$confirm(`确定要保存备注信息?`, {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
         type: 'warning',
         type: 'warning',
       })
       })
-        .then(() => {})
-        .catch(() => {
-          return false
+        .then(() => {
+          remarksAdd({
+            paymentManagementList : this.modification,
+            remarks: this.remarks
+            })
+            .toPromise()
+            .then(() => {
+            this.collectForm1 = false
+            this.$message.success('添加备注信息成功')
+            this.paymentManagementList = {}
+            this.getList()
+
+            })
+            .catch(() => {
+              return false
+            })
         })
         })
     },
     },
+    //     disableReasons() {
+    //   this.outerVisible = false
+    //   this.disablieForm.disableStatusFlag = 0
+    //   disableDriver(this.disablieForm)
+    //     .toPromise()
+    //     .then((response) => {
+    //       this.$notify.success({
+    //         title: '成功',
+    //         message: '禁用成功',
+    //       })
+    //       this.getList()
+    //     })
+    //     .catch((response) => {
+    //       EventBus.$emit('error', response.message)
+    //     })
+    // },
     handlePictureCardPreview1(file) {
     handlePictureCardPreview1(file) {
       this.collectionScreenshot = file.url
       this.collectionScreenshot = file.url
     },
     },
-    adopt() {
-      if (this.modification.length == 0) {
-        this.$message.warning('请选择要备注的条目')
+    dataFilter(val) {
+      // console.log(val,"名")
+      this.contractNo = val 
+      if (val) {
+        //val存在
+        this.options = this.contractNoList.filter(item => {
+          if (
+            !!~item.contractNo.indexOf(val) ||
+            !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
       } else {
       } else {
-        this.collectForm1 = true
+        //val为空时,还原数组
+        this.options = this.contractNoList
       }
       }
     },
     },
     selectInit(row) {
     selectInit(row) {
@@ -405,28 +508,39 @@ export default {
       }
       }
     },
     },
     getList(){
     getList(){
-      detailsList({
+     getcollection({
+       managementType : this.managementType,
+       currentPage:this.currentPage,
+       pageSize:this.pageSize,
+       searchKeyWord:this.searchKeyWord,
+       searchType:this.searchType,
+       warehouseName:this.warehouseName,
+       contractNo: this.contractNo,
+      }).toPromise().then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+          }
+           this.collectList = response.records
+        })
+      contractList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
-        pcFlag: this.pcFlag,
-        searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord,
       })
       })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
-          for (var i = 0; i < response.records.length; i++) {
-            response.records[i].identification = 'false'
-          }
-          this.warehouseList = response
-          this.deptCircularPage.currentPage = response.current
-          this.deptCircularPage.pageSize = response.size
-          this.deptBudgetTotal = response.total
+          this.contractNoList = response
+          this.contractNoList.unshift({contractNo:'全部合同'})
+          this.options=this.contractNoList
+          console.log( this.options[0].listStatus)
         })
         })
-      }
+   },
+    handleRemove(file) {
+      console.log(file)
     },
     },
     handleSelectionChange(val) {
     handleSelectionChange(val) {
       this.modification = val
       this.modification = val
+      
     },
     },
     selecttaskType() {},
     selecttaskType() {},
     handleSizeChange(val) {
     handleSizeChange(val) {
@@ -439,6 +553,7 @@ export default {
       console.log(`当前页: ${val}`)
       console.log(`当前页: ${val}`)
       this.getList()
       this.getList()
     },
     },
+},
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
@@ -480,5 +595,11 @@ export default {
   width: 40%;
   width: 40%;
   display: inline-flex;
   display: inline-flex;
 }
 }
+.deal {
+  width: 66%;
+}
+.inputs {
+  margin: 0 auto;
+}
 </style>
 </style>
 
 

+ 74 - 34
src/views/outboundManagement/collectionment.vue

@@ -22,12 +22,14 @@
       </el-col>
       </el-col>
     </el-row>
     </el-row>
     <div class="substance">
     <div class="substance">
-      <ws-form>
+      <ws-form
+      ref="collectionList">
         <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="contractNo">
             <ws-form-item label="合同编号" span="1" prop="contractNo">
               <ws-input
               <ws-input
+              v-model="collectionList.contractNo" 
                 placeholder="请输入合同编号"
                 placeholder="请输入合同编号"
                 maxlength="100"
                 maxlength="100"
                 disabled
                 disabled
@@ -36,6 +38,7 @@
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="仓位号" span="1" prop="binNumber">
             <ws-form-item label="仓位号" span="1" prop="binNumber">
               <ws-input
               <ws-input
+              v-model="collectionList.binNumber" 
                 placeholder="请输入仓位号"
                 placeholder="请输入仓位号"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
@@ -43,39 +46,37 @@
               />
               />
             </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="warehouseList.a"
-                placeholder="请输入货名"
-                class="typeselect"
-                @change="selectpackingMethod"
-               disabled
-              >
-                <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
-                />
-              </ws-select>
+                <ws-input 
+                v-model="collectionList.goodsName" 
+                placeholder="请输入货名" 
+                maxlength="100" 
+                size="small" 
+                disabled />
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="storageTagNo">
             <ws-form-item label="囤位号" span="1" prop="storageTagNo">
-              <ws-input placeholder="请输入囤位号" maxlength="100" size="small" disabled />
+              <ws-input 
+              v-model="collectionList.storageTagNo" 
+              placeholder="请输入囤位号" maxlength="100" size="small" disabled />
             </ws-form-item>
             </ws-form-item>
-            <ws-form-item label="单价(元/公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入单价" maxlength="100" size="small" disabled/>
+            <ws-form-item label="单价(元/公斤)" span="1" prop="contractPrice">
+              <ws-input 
+              v-model="collectionList.contractPrice" placeholder="请输入单价" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
-            <ws-form-item label="车牌号" span="1" prop="carNumber">
-              <ws-input placeholder="请输入车牌号" maxlength="100" size="small" disabled/>
+            <ws-form-item label="车牌号" span="1" prop="carNo">
+              <ws-input 
+              v-model="collectionList.carNo" placeholder="请输入车牌号" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
           </ws-info-table>
           </ws-info-table>
 
 
           <div class="title">质检数据</div>
           <div class="title">质检数据</div>
           <ws-info-table>
           <ws-info-table>
-            <ws-form-item label="等级" span="1" prop="waterContent">
-              <ws-input placeholder="请输入编号" maxlength="100" size="small" disabled/>
+            <ws-form-item label="等级" span="1" prop="grade">
+              <ws-input 
+              v-model="collectionList.qualityInspectionManagement.grade" placeholder="请输入等级" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
-            <ws-form-item label="杂质(%)" span="1" prop="waterContent">
+            <ws-form-item label="杂质(%)" span="1" prop="impurity">
               <ws-input
               <ws-input
+              v-model="collectionList.qualityInspectionManagement.impurity"
                 placeholder="请输入杂质占比"
                 placeholder="请输入杂质占比"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
@@ -84,33 +85,38 @@
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
               <ws-input
               <ws-input
+              v-model="collectionList.qualityInspectionManagement.waterContent"
                 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="waterContent">
+            <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
               <ws-input
               <ws-input
+              v-model="collectionList.qualityInspectionManagement.mildewGrain"
                 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="waterContent">
-              <ws-input placeholder="请输入容重" maxlength="100" size="small" disabled/>
+            <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+              <ws-input 
+              v-model="collectionList.qualityInspectionManagement.bulkDensity" placeholder="请输入容重" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
-            <ws-form-item label="热损伤(%)" span="1" prop="waterContent">
+            <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
               <ws-input
               <ws-input
+              v-model="collectionList.qualityInspectionManagement.jiaorenli"
                 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="waterContent">
+            <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
               <ws-input
               <ws-input
+              v-model="collectionList.qualityInspectionManagement.imperfectGrain"
                 placeholder="请输入不完整粒占比"
                 placeholder="请输入不完整粒占比"
                 maxlength="100"
                 maxlength="100"
                 size="small"
                 size="small"
@@ -122,13 +128,16 @@
           <div class="title">检斤信息</div>
           <div class="title">检斤信息</div>
           <ws-info-table>
           <ws-info-table>
             <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
             <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
-              <ws-input placeholder="请输入毛重" maxlength="100" size="small" disabled/>
+              <ws-input 
+              v-model="collectionList.weighingManagement.grossWeight" placeholder="请输入毛重" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="皮重(公斤)" span="1" prop="tare">
             <ws-form-item label="皮重(公斤)" span="1" prop="tare">
-              <ws-input placeholder="请输入皮重" maxlength="100" size="small" disabled/>
+              <ws-input 
+              v-model="collectionList.weighingManagement.tare" placeholder="请输入皮重" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
             <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
             <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
-              <ws-input placeholder="请输入净重" maxlength="100" size="small" disabled/>
+              <ws-input 
+              v-model="collectionList.weighingManagement.netWeight" placeholder="请输入净重" maxlength="100" size="small" disabled/>
             </ws-form-item>
             </ws-form-item>
           </ws-info-table>
           </ws-info-table>
           <div class="but">
           <div class="but">
@@ -140,14 +149,26 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {
+  getcollectionexamine,
+} from '@/model/outboundManagement/index'
 export default {
 export default {
   watch: {},
   watch: {},
   data() {
   data() {
     return {
     return {
-      warehouseList: {},
+      collectionList:{
+        goodsName:'',
+        contractNo:'',
+        binNumber:'',
+        carNo:'',
+        storageTagNo:'',
+        contractPrice:'',
+        weighingManagement:{},
+        qualityInspectionManagement:{}
+        },
       disabled:false,
       disabled:false,
       types:'',
       types:'',
+      compId: sessionStorage.getItem('ws-pf_compId'),
       information:'结算',
       information:'结算',
     }
     }
   },
   },
@@ -157,12 +178,31 @@ export default {
          this.disabled=true
          this.disabled=true
          this.information = '查看'   
          this.information = '查看'   
     }
     }
-    console.log( this.information)
+    this.getList()
   },
   },
   methods: {
   methods: {
     cancel() {
     cancel() {
       this.$router.push({ path: 'collectionManagement' })
       this.$router.push({ path: 'collectionManagement' })
     },
     },
+     getList(){
+      getcollectionexamine({
+        id:this.$route.query.id,
+        relationId: this.$route.query.relationId,
+        compId: sessionStorage.getItem('ws-pf_compId'),
+      })
+      .toPromise()
+      .then((response) => {
+          this.collectionList = response
+          this.qualityInspectionManagement = response
+          // this.paymentList.qualityInspectionManagement.waterMin=this.$route.query.waterMin
+          // this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
+          // this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
+          // this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+          // if(!this.paymentList.solidGrainPrice){
+          //   this.paymentList.solidGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base
+          // }
+        })
+    },
   },
   },
 }
 }
 </script>
 </script>

+ 2 - 2
src/views/outboundManagement/weighing.vue

@@ -89,7 +89,7 @@
 	import {
 	import {
 		grossWeight,
 		grossWeight,
 		getbinNumber,
 		getbinNumber,
-		contractList,
+		contractListWeighing,
 		tareAdd,
 		tareAdd,
 		tareEdit,
 		tareEdit,
 		getweighing
 		getweighing
@@ -213,7 +213,7 @@
 						}
 						}
 					})
 					})
 				//合同编号
 				//合同编号
-				contractList({
+				contractListWeighing({
 						compId: sessionStorage.getItem('ws-pf_compId'),
 						compId: sessionStorage.getItem('ws-pf_compId'),
 						flag: 5
 						flag: 5
 					})
 					})