소스 검색

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

mxx 3 년 전
부모
커밋
8f2028c65c

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

@@ -74,3 +74,8 @@ export const API_POST_PAYMENT_DEL = '/paymentManagement/api/deleteInfo'
 export const API_POST_PAYMENT_AUDIT = '/paymentManagement/api/openAuditFlow'
 //付款提交
 export const API_POST_PAYMENT_PAYMENTSUBMIT = '/paymentManagement/api/payMoney'
+//付款结算修改
+export const API_POST_PAYMENT_SETTLEMENTEDIT = '/paymentManagement/api/editCollect'
+
+
+

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

@@ -38,6 +38,7 @@ import {
   API_POST_PAYMENT_DEL,
   API_POST_PAYMENT_AUDIT,
   API_POST_PAYMENT_PAYMENTSUBMIT,
+  API_POST_PAYMENT_SETTLEMENTEDIT,
   API_GET_CUSTOMER_CODE,
   API_GET_CUSTOMER_CODEJY
 } from '@/api/V2/houseSelfCollect'
@@ -117,3 +118,5 @@ export const delpayment  = appRx.post(API_POST_PAYMENT_DEL, errorCatcher, errorH
 export const auditpayment  = appRx.post(API_POST_PAYMENT_AUDIT, errorCatcher, errorHandle, filter)
 //付款提交
 export const paymentCommit = appRx.post(API_POST_PAYMENT_PAYMENTSUBMIT, errorCatcher, errorHandle, filter)
+//付款结算修改
+export const settlementEdit = appRx.post(API_POST_PAYMENT_SETTLEMENTEDIT, errorCatcher, errorHandle, filter)

+ 5 - 5
src/views/houseSelfCollect/component/paymentPrint.vue

@@ -129,11 +129,11 @@
         <div class="">客户签名</div>
       </div>
       <div class="bottom-row3">扫一扫</div>
-      <div class="bottom-row4">
-        <el-button type="primary">关闭</el-button>
-        <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
-        <el-button type="primary" @click="printBig">打印单据</el-button>
-      </div>
+      <!-- <div class="bottom-row4">
+        <el-button type="primary">关闭</el-button> 
+         <el-button type="primary" @click="printSmall">打印小票</el-button> 
+         <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div> -->
     </div>
   </div>
 </template>

+ 4 - 6
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -77,11 +77,11 @@
             <div class="autograph">客户签名:</div>
           </div>
           <div class="bottom-row3">扫一扫</div>
-           <div class="bottom-row4">
-        <el-button type="primary">关闭</el-button>
+           <!-- <div class="bottom-row4">
+         <el-button type="primary">关闭</el-button>
         <el-button type="primary" @click="printSmall">打印小票</el-button>
-        <el-button type="primary" @click="printBig">打印单据</el-button>
-      </div>
+        <el-button type="primary" @click="printBig">打印单据</el-button> 
+      </div> -->
         </div>
         
     </div>
@@ -102,13 +102,11 @@ export default{
       methods:{
         
             printSmall() {
-                  console.log(this.tableData,"对象")
       window.location.href =
         '../../../../static/weightCheck.html?type=1&tableData=' +
         JSON.stringify(this.tableData)
     },
     printBig() {
-           console.log(this.tableData,"对象")
       window.location.href =
         '../../../../static/weightCheck.html?type=2&tableData=' +
         JSON.stringify(this.tableData)

+ 6 - 4
src/views/houseSelfCollect/inspectInfo.vue

@@ -135,7 +135,7 @@
     getamount,
     getCount,
   } from '@/model/houseSelfCollect/index'
-  import {
+   import {
     packList
   } from '@/model/contarct/index'
   import inspectInfoPrint from './component/inspectInfoPrint.vue'
@@ -170,9 +170,12 @@
         typeList: ['干粮', '潮粮'],
         purchasePriceList: [],
         id: '',
+        imgUrl:"",
+        printData:[],
       }
     },
     activated() {
+      
       this.types = this.$route.query.type
       this.cangid = this.$route.query.cangid
       this.warehouseName = this.$route.query.warehouseName
@@ -227,7 +230,7 @@
           let dataURL = canvas.toDataURL("image/png");
           this.imgUrl = dataURL;
           if (this.imgUrl !== "") {
-            let b = this.dataURLtoFile(this.imgUrl, "aa")
+            let b = this.dataURLtoFile(this.imgUrl, "printImg")
             console.log(b)
             let formdata = new FormData();
             formdata.append("file", b);
@@ -456,6 +459,7 @@
         }
       },
       cancel() {
+        this.inspect = [] 
         this.$router.push({
           path: 'inspectionManagement'
         })
@@ -486,7 +490,6 @@
           .then((response) => {
             for (let i = 0; i < this.purchasePriceList.length; i++) {
               if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
-                console.log(this.purchasePriceList[i].saleLimit - response)
                 if (this.purchasePriceList[i].saleLimit - response < 50 || count > 0) {
                     this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + response +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
                           '提示',
@@ -551,7 +554,6 @@
           .then((response) => {
             for (let i = 0; i < this.purchasePriceList.length; i++) {
               if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
-                console.log(this.purchasePriceList[i].saleLimit - response)
                 if (this.purchasePriceList[i].saleLimit - response < 50 || count > 0) {
                     this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + response +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
                           '提示',

+ 380 - 174
src/views/houseSelfCollect/paymentManagement.vue

@@ -11,10 +11,19 @@
         <ws-button type="primary" @click="payment">付款</ws-button>
       </template>
       <template slot="right">
-        <el-select v-model="warehouseNameKey" placeholder="请选择" @change="warehouseChange">
-          <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
+        <el-select
+          v-model="warehouseNameKey"
+          placeholder="请选择"
+          @change="warehouseChange"
+        >
+          <el-option
+            v-for="item in warehouseList"
+            :key="item.id"
+            :label="item.warehouseName"
+            :value="item.id"
+          >
           </el-option>
-          </el-select>
+        </el-select>
         <div></div>
         <ws-input
           v-model="searchKeyWord"
@@ -81,32 +90,32 @@
       ></el-table-column>
       <el-table-column
         class="table_td"
-        width='180'
+        width="180"
         prop="type"
         label="类型"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="tidalGrainPrice"
-         width='180'
+        width="180"
         label="净重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="solidGrainPrice"
-        width='180'
+        width="180"
         label="纯重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="netWeight"
-        width='140'
+        width="140"
         label="净重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
         prop="pureWeight"
-        width='140'
+        width="140"
         label="纯重(公斤)"
       ></el-table-column>
       <el-table-column
@@ -124,15 +133,13 @@
         prop="collectionIngPayable"
         label="更新时间"
       ></el-table-column>
-      <el-table-column
-        class="table_td"
-        prop="status"
-        label="状态"
-      >
-      <template scope="scope">
-        <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span>
-        <span v-else>{{scope.row.status}}</span>
-      </template>
+      <el-table-column class="table_td" prop="status" label="状态">
+        <template scope="scope">
+          <span v-if="scope.row.approveStatus">{{
+            scope.row.approveStatus
+          }}</span>
+          <span v-else>{{ scope.row.status }}</span>
+        </template>
       </el-table-column>
       <el-table-column
         class="table_td"
@@ -140,126 +147,206 @@
         label="操作"
         width="350"
       >
-      <template scope="scope">
-        <el-button type="danger" v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="del(scope.row)">删除</el-button>
-        <el-button v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="settlement(1,scope.row)">结算</el-button>
-        <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click="settlement(2,scope.row)">查看</el-button>
-        <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"||userJurisdiction' @click='print(scope.row)'>打印</el-button>
-      </template>
+        <template scope="scope">
+          <el-button
+            type="danger"
+            v-if="!scope.row.approveStatus && scope.row.status != '已驳回'"
+            @click="del(scope.row)"
+            >删除</el-button
+          >
+          <el-button
+            v-if="!scope.row.approveStatus && scope.row.status != '已驳回'"
+            @click="settlement(1, scope.row)"
+            >结算</el-button
+          >
+          <el-button
+            v-if="scope.row.approveStatus || scope.row.status == '已驳回'"
+            @click="settlement(2, scope.row)"
+            >查看</el-button
+          >
+          <el-button
+            v-if="
+              scope.row.approveStatus ||
+              scope.row.status == '已驳回' ||
+              userJurisdiction
+            "
+            @click="print(scope.row)"
+            >打印</el-button
+          >
+        </template>
       </el-table-column>
     </el-table>
     <!-- 付款弹窗 -->
-    <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true">
-      <ws-form>
-        <ws-info-table>
-          <ws-form-item label="未付金额(元)" prop="waterContent">
-            <ws-input
-              placeholder="请输入未付金额(元)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="本次付款金额(元)" prop="waterContent">
-            <ws-input
-              placeholder="请输入本次付款金额(元)"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="付款日期" prop="waterContent">
-            <el-date-picker v-model="value1" type="date" placeholder="选择日期">
-            </el-date-picker>
-          </ws-form-item>
-        </ws-info-table>
-        <div style="text-align: center">
-          <el-button @click="paymentForm = false">取消</el-button>
-          <el-button @click="paymentSubmit">提交</el-button>
-        </div>
-      </ws-form>
-    </el-dialog>
-    <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>
     <el-dialog
-      width="70%"
-      class="table-content"
-      center
-      :visible.sync="isShowPrint"
-      title="中天昊元粮食贸易有限公司结算凭证"
+      width="40%"
+      :visible.sync="paymentForm"
+      :append-to-body="true"
+      title="付款"
     >
-      <paymentPrint :printData="printData"></paymentPrint>
+      <div class="tanchuang">
+        <ws-form>
+          <ws-info-table>
+            <ws-form-item label="未付金额(元)" prop="amountNotPayable">
+              {{ payments.amountNotPayable }}
+            </ws-form-item>
+            <ws-form-item label="本次付款金额(元)" prop="money">
+              <ws-input
+                v-model="payments.money"
+                placeholder="请输入本次付款金额(元)"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="付款日期" prop=" paymentDate">
+              <el-date-picker
+                v-model="payments.paymentDate"
+                type="date"
+                placeholder="选择日期"
+              >
+              </el-date-picker>
+            </ws-form-item>
+            <ws-form-item label="上传截图" prop=" paymentScreenshot">
+            </ws-form-item>
+            <div class="upLoad">
+              <el-upload
+                class="avatar-uploader"
+                action="https://www.zthymaoyi.com/upload/admin"
+                :show-file-list="false"
+                :on-success="handleAvatarSuccess"
+              >
+                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+            </div>
+          </ws-info-table>
+          <div style="text-align: center; margin-top: 20px">
+            <el-button @click="paymentForm = false">取消</el-button>
+            <el-button @click="paymentSubmit">提交</el-button>
+          </div>
+        </ws-form>
+      </div>
     </el-dialog>
+    <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>
+      <el-dialog
+        width="70%"
+        class="table-content"
+        center
+        :visible.sync="isShowPrint"
+        title="中天昊元粮食贸易有限公司结算凭证"
+      >
+        <paymentPrint :printData="printData"></paymentPrint>
+        <div style="text-align: center">
+          <el-button type="primary" @click="isShowPrint = false"
+            >关闭</el-button
+          >
+          <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
+          <el-button type="primary" @click="printBig">打印单据</el-button>
+        </div>
+      </el-dialog>
     </div>
   </div>
 </template>
 <script>
-import {getpayment,selectWarehouseSelf,delpayment,auditpayment,getpaymentexamine,paymentCommit} from '@/model/houseSelfCollect/index'
+import {
+  getpayment,
+  selectWarehouseSelf,
+  delpayment,
+  auditpayment,
+  getpaymentexamine,
+  paymentCommit,
+} from '@/model/houseSelfCollect/index'
 import { posthandle } from '@/model/purchasingManagement/index'
 import paymentPrint from './component/paymentPrint.vue'
-  import { getHp } from '@/utils/getHasPermission'
+import { getHp } from '@/utils/getHasPermission'
 export default {
-  components: {paymentPrint},
+  components: { paymentPrint },
   watch: {},
   data() {
     return {
       //分页
       currentPage: 1,
       pageSize: 10,
-      paymentList:[],
-      deptCircularPage:{},
+      paymentList: [],
+      deptCircularPage: {},
       deptBudgetTotal: 0,
       paymentForm: false,
       taskTypeList: ['一号库'],
       searchType: '',
       searchTypeText: '',
       searchKeyWord: '',
-      warehouseList:[],
-      warehouseNameKey:'',
-      warehouseName:'',
+      warehouseList: [],
+      warehouseNameKey: '',
+      warehouseName: '',
       isShowPrint: false,
-      printData:{},
-      warehouse:[],
+      printData: {},
+      warehouse: [],
       value1: '', //付款日期
       modification: [],
-      userJurisdiction:true
+      userJurisdiction: true,
+      payments: {
+        amountNotPayable: 0,
+        paymentDate:"",
+      },
+      //上传截图路径
+      imageUrl: '',
     }
   },
   activated() {
-         this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
-     selectWarehouseSelf({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        personCharge: sessionStorage.getItem('ws-pf_staffName'),
-      }).toPromise().then((response) => {
-          this.warehouseList = response
-          // this.$set(this.warehouseName,response[0].warehouseName)
-          // this.warehouseName=response[0].warehouseName
-          // this.warehouse=response[0]
-          this.warehouseList = response
-          this.warehouseNameKey = this.warehouseList[0].id
-          this.warehouseName = this.warehouseList[0].warehouseName
-          this.getList()
-        })
-
+    this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
+    selectWarehouseSelf({
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      personCharge: sessionStorage.getItem('ws-pf_staffName'),
+    })
+      .toPromise()
+      .then((response) => {
+        this.warehouseList = response
+        // this.$set(this.warehouseName,response[0].warehouseName)
+        // this.warehouseName=response[0].warehouseName
+        // this.warehouse=response[0]
+        this.warehouseList = response
+        this.warehouseNameKey = this.warehouseList[0].id
+        this.warehouseName = this.warehouseList[0].warehouseName
+        this.getList()
+      })
   },
   methods: {
-   getList(){
-     getpayment({
-       currentPage:this.currentPage,
-       pageSize:this.pageSize,
-       searchKeyWord:this.searchKeyWord,
-       searchType:this.searchType,
-       warehouseName:this.warehouseName
-      }).toPromise().then((response) => {
+    //上传付款截图
+    handleAvatarSuccess(e) {
+      this.imageUrl = e.url
+      console.log(e, 'dkltgoidrhfglkhs')
+    },
+    printSmall() {
+      window.location.href =
+        '../../../../../static/payprint.html?type=1&dataList=' +
+        JSON.stringify(this.printData)
+    },
+    printBig() {
+      window.location.href =
+        '../../../../../static/payprint.html?type=2&dataList=' +
+        JSON.stringify(this.printData)
+    },
+    getList() {
+      getpayment({
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchKeyWord: this.searchKeyWord,
+        searchType: this.searchType,
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
           this.paymentList = response
         })
-   },
+    },
     del(row) {
       this.$confirm(
         '对应的质检和检斤记录将一并删除,是否确定删除操作?',
@@ -271,49 +358,92 @@ export default {
         }
       )
         .then(() => {
-          delpayment({id:row.id}).toPromise().then((response) => {
-         this.$message.success('删除成功')
-         this.getList()
-        })
+          delpayment({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('删除成功')
+              this.getList()
+            })
         })
         .catch(() => {
           return false
         })
     },
-    settlement(index,row) {
-      var data={}
-      var data1={}
+    settlement(index, row) {
+      var data = {}
+      var data1 = {}
       for (let i = 0; i < this.warehouseList.length; i++) {
-        if(this.warehouseList[i].id==this.warehouseNameKey){
-          data=this.warehouseList[i]
+        if (this.warehouseList[i].id == this.warehouseNameKey) {
+          data = this.warehouseList[i]
         }
       }
       console.log(data)
       for (let i = 0; i < data.purchasePriceList.length; i++) {
-        if(data.purchasePriceList[i].goodsName==row.goodsName){
-          data1=data.purchasePriceList[i]
+        if (data.purchasePriceList[i].goodsName == row.goodsName) {
+          data1 = data.purchasePriceList[i]
         }
       }
-      if(row.goodsName)
-      this.$router.push({ path: 'settlement', query: { type: index,id: row.id,waterMin:data1.waterMin} })
+      if (row.goodsName)
+        this.$router.push({
+          path: 'settlement',
+          query: { type: index, id: row.id, waterMin: data1.waterMin },
+        })
     },
     payment() {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要付款的条目')
       } else {
+        console.log(this.modification)
+        let sum = 0
+        let count = 0
+        for (let i = 0; i < this.modification.length; i++) {
+          sum += this.modification[i].amountIngPayable
+          count += this.modification[i].amountEdPayable
+        }
+        this.payments.amountNotPayable = sum - count
         this.paymentForm = true
       }
     },
     paymentSubmit() {
-
-        //付款提交
-      paymentCommit()
-      .toPromise().then((response) => {
-          // this.paymentList = response
+      if (!this.payments.money) {
+        this.$message({
+          message: '付款金额不能为空',
+          type: 'warning',
         })
-
-
-
+        return
+      }
+      if (this.payments.money > this.payments.amountNotPayable) {
+        this.$message({
+          message: '付款金额不能超过未付金额',
+          type: 'warning',
+        })
+        return
+      }
+      // if(this.payments.money > this.payments.amountNotPayable){
+      //   this.$message({
+      //     message: '付款金额不能超过未付金额',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      if (!this.payments.paymentDate) {
+        this.$message({
+          message: '付款日期不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.imageUrl) {
+        this.$message({
+          message: '请上传付款截图 ',
+          type: 'warning',
+        })
+        return
+      }
+      this.payments.paymentScreenshot = this.imageUrl
+      this.payments.cashier = sessionStorage.getItem('ws-pf_staffName')
+      console.log(this.payments,"付款")
+      return
 
       this.$confirm('确定提交付款信息?', '提示', {
         confirmButtonText: '确定',
@@ -321,8 +451,17 @@ export default {
         type: 'warning',
       })
         .then(() => {
-
-
+          //付款提交
+          paymentCommit(this.payments)
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '付款成功',
+              })
+              // this.paymentList = response
+              this.$router.go(-1)
+            })
         })
         .catch(() => {
           return false
@@ -338,7 +477,7 @@ export default {
           type: 'warning',
         })
           .then(() => {
-            this.audit(this.modification[0], 0,false,'','')
+            this.audit(this.modification[0], 0, false, '', '')
           })
           .catch(() => {
             return false
@@ -347,53 +486,62 @@ export default {
     },
     audit(item, index, status, status2, reason) {
       if (index < this.modification.length) {
-        if(status==true&&item.status=='已驳回'){
-          console.log(11111)
-          auditpayment({compId:sessionStorage.getItem('ws-pf_compId'),id:item.id}).toPromise()
-          .then((response) => {
-            console.log(22222)
-            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
-          })
-        }else{
-        posthandle({
-          taskId: item.taskId,
-          approved: status,
-          auditMind: reason != undefined ? '已驳回' : '34',
-          needReapply: status2 != undefined ? true : false,
-        })
-          .toPromise()
-          .then((response) => {
-            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
+        if (status == true && item.status == '已驳回') {
+          auditpayment({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            id: item.id,
           })
-          .catch((req) => {
-            this.$message.warning(req.message)
+            .toPromise()
+            .then((response) => {
+              this.audit(
+                this.modification[index + 1],
+                index + 1,
+                status,
+                status2,
+                reason
+              )
+            })
+        } else {
+          posthandle({
+            taskId: item.taskId,
+            approved: status,
+            auditMind: reason != undefined ? '已驳回' : '34',
+            needReapply: status2 != undefined ? true : false,
           })
+            .toPromise()
+            .then((response) => {
+              this.audit(
+                this.modification[index + 1],
+                index + 1,
+                status,
+                status2,
+                reason
+              )
+            })
+            .catch((req) => {
+              this.$message.warning(req.message)
+            })
         }
-
       } else {
-        if (status==true) {
+        if (status == true) {
           this.$message.success('通过成功')
           this.getList()
-        } else if (status==false) {
+        } else if (status == false) {
           this.$message.success('驳回成功')
           this.getList()
-          }
+        }
       }
     },
     adopt() {
-      var that =this
+      var that = this
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
-        this.$confirm(
-          '是否确定通过?',
-          '提示',
-          {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
-          }
-        )
+        this.$confirm('是否确定通过?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
           .then(() => {
             this.audit(this.modification[0], 0, true)
           })
@@ -403,12 +551,14 @@ export default {
       }
     },
     print(row) {
-      getpaymentexamine({id:row.id}).toPromise().then((response) => {
+      getpaymentexamine({ id: row.id })
+        .toPromise()
+        .then((response) => {
           this.isShowPrint = true
-          this.printData =response
-          console.log("printData",response)
+          this.printData = response
+          console.log('printData', response)
         })
-      },
+    },
     examine() {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要审核的条目')
@@ -436,16 +586,15 @@ export default {
     // },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
-      if(row.status!='已驳回'){
+      if (row.status != '已驳回') {
         if (row.taskId == null) {
           return false
         } else {
           return true
         }
-      }else{
+      } else {
         return true
       }
-
     },
 
     handleSelectionChange(val) {
@@ -466,13 +615,13 @@ export default {
     // },
     warehouseChange(e) {
       for (let i = 0; i < this.warehouseList.length; i++) {
-        if(this.warehouseList[i].id==this.warehouseNameKey){
-          this.warehouseName=this.warehouseList[i].warehouseName
+        if (this.warehouseList[i].id == this.warehouseNameKey) {
+          this.warehouseName = this.warehouseList[i].warehouseName
         }
       }
       this.getList()
     },
-     handleSizeChange(val) {
+    handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
       this.getList()
@@ -502,6 +651,18 @@ export default {
 /deep/.ws-info-table .el-form-item .el-form-item__content {
   border: none;
 }
+
+/deep/.el-dialog__title {
+  font-size: 24px !important;
+}
+/deep/.el-dialog__header {
+  text-align: center !important;
+  padding: 10px 0 !important;
+  height: auto !important;
+  border: none;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
 .title {
   font-size: 16px;
   font-weight: 600;
@@ -531,10 +692,55 @@ table {
 /deep/.el-table--enable-row-transition .el-table__body td {
   text-align: center;
 }
-.title{
-  padding:10px;
-  text-align:center;
+.title {
+  padding: 10px;
+  text-align: center;
+}
+.tanchuang {
+  margin: 0 auto;
+}
+.tanchuang .ws-info-table {
+  display: initial;
+}
+.tanchuang .ws-info-table .el-form-item {
+  margin: 0 auto;
+  text-align: center;
+}
+.upLoad {
+  width: 40%;
+  margin: 0 auto;
+  // border: 1px solid #8890b1;
+  // border-radius: 3px;
+}
+// .avatar{
+//   width: 150px;
+//   height: 150px;
+// }
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+  border: 1px solid #8890b1;
+  border-radius: 5px;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  border: 1px solid #8890b1;
+  border-radius: 5px;
+  display: block;
 }
-
-
 </style>

+ 208 - 119
src/views/houseSelfCollect/settlement.vue

@@ -24,7 +24,7 @@
     <div class="substance">
       <ws-form>
         <div style="width: 50%; margin: 0 auto">
-          <div class="title">基本信息</div>
+          <div class="titles">基本信息</div>
           <ws-info-table>
             <ws-form-item label="编号" span="1" prop="paymentNo">
               <ws-input
@@ -72,7 +72,7 @@
                 <ws-input v-model="paymentList.solidGrainPrice" placeholder="请输入干粮单价" maxlength="100" size="small" :disabled='disabled' />
             </ws-form-item>
           </ws-info-table>
-          <div class="title">质检数据</div>
+          <div class="titles">质检数据</div>
           <ws-info-table>
             <ws-form-item label="等级" span="1" prop="waterContent">
               <ws-input v-model="paymentList.qualityInspectionManagement.grade" placeholder="请输入等级" maxlength="100" size="small" disabled />
@@ -127,7 +127,7 @@
             </ws-form-item>
           </ws-info-table>
 
-          <div v-if='paymentList.type=="潮粮"' class="title">单价核算</div>
+          <div v-if='paymentList.type=="潮粮"' class="titles">单价核算</div>
           <ws-info-table v-if='paymentList.type=="潮粮"'>
             <ws-form-item label="潮粮水分(%)" span="1" prop="waterContent">
               <ws-input
@@ -209,7 +209,7 @@
             </ws-form-item>
           </ws-info-table>
 
-          <div class="title">结算金额(元)</div>
+          <div class="titles">结算金额(元)</div>
           <ws-info-table>
             <ws-form-item v-if='paymentList.type=="潮粮"'
               label="粮款 = 净重 x 净重单价 ="
@@ -368,15 +368,33 @@
         </div>
       </ws-form>
     </div>
-    <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
+     <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="中天昊元粮食贸易有限公司结算凭证"
+       @close="closeDialog"
+    >
+      <paymentPrint :printData="printData" ref="saveImg"></paymentPrint>
+      <div style="text-align:center">
+        <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+        <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+       
+    </el-dialog>
+
   </div>
 </template>
 <script>
-import {getpaymentexamine,postpaymentedit} from '@/model/houseSelfCollect/index'
-// import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
+import {getpaymentexamine,postpaymentedit,settlementEdit} from '@/model/houseSelfCollect/index'
+import paymentPrint from './component/paymentPrint.vue'
+import html2canvas from "html2canvas"
+import axios from "axios"
 export default {
   components: {
-    // houseSelfCollectPrint,
+    paymentPrint
   },
   watch: {},
   data() {
@@ -390,8 +408,10 @@ export default {
      },
       disabled:false,
       types:'',
-
+      isShowPrint:false,
       information:'结算',
+      printData:{},
+      imgUrl:"",
     }
   },
   activated() {
@@ -406,6 +426,41 @@ export default {
    this.getList()
   },
   methods: {
+    closeDialog(){
+      debugger
+      html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+        let dataURL = canvas.toDataURL('image/png')
+        this.imgUrl = dataURL
+        if (this.imgUrl !== '') {
+          let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+          let formdata = new FormData()
+          formdata.append('file', b)
+          axios({
+            method: 'post',
+            url: 'https://www.zthymaoyi.com/upload/admin',
+            data: formdata,
+          }).then((response) => {
+            //编辑接口
+            this.paymentList.pictureAddress = response.data.url
+            settlementEdit(this.paymentList)
+              .toPromise()
+              .then((response) => {})
+          })
+          this.dialogTableVisible = true
+        }
+      })
+
+    },
+    printSmall() {
+        window.location.href =
+          '../../../../../static/payprint.html?type=1&dataList=' +
+          JSON.stringify(this.printData)
+      },
+      printBig() {
+        window.location.href =
+          '../../../../../static/payprint.html?type=2&dataList=' +
+          JSON.stringify(this.printData)
+      },
     getList(){
       getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
           this.paymentList = response
@@ -524,126 +579,120 @@ export default {
           return chineseStr;
         },
     print() {
-       if (!this.paymentList.buckleWeightRatio) {
-          this.$message({
-            message: '扣重比不能为空',
-            type: 'warning',
-          })
-          return
-        }
-        if (this.paymentList.buckleWeightRatio < 0 || this.paymentList.buckleWeightRatio > 2) {
-          this.$message({
-            message: '扣重比输入错误',
-            type: 'warning',
-          })
-          return
-        }
+      //  if (!this.paymentList.buckleWeightRatio) {
+      //     this.$message({
+      //       message: '扣重比不能为空',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
+      //   if (this.paymentList.buckleWeightRatio < 0 || this.paymentList.buckleWeightRatio > 2) {
+      //     this.$message({
+      //       message: '扣重比输入错误',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
 
-        if (this.paymentList.weighingSubsidy < 0 || this.paymentList.weighingSubsidy > 100000) {
-          this.$message({
-            message: '称重补助范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.weighingSubsidy < 0 || this.paymentList.weighingSubsidy > 100000) {
+      //     this.$message({
+      //       message: '称重补助范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
      
-        if (this.paymentList.weighingDeduction < 0 || this.paymentList.weighingDeduction > 100000) {
-          this.$message({
-            message: '称重扣款范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.weighingDeduction < 0 || this.paymentList.weighingDeduction > 100000) {
+      //     this.$message({
+      //       message: '称重扣款范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
         
-        if (this.paymentList.freightSubsidy < 0 || this.paymentList.freightSubsidy > 100000) {
-          this.$message({
-            message: '运费补助范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.freightSubsidy < 0 || this.paymentList.freightSubsidy > 100000) {
+      //     this.$message({
+      //       message: '运费补助范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
      
-        if (this.paymentList.freightDeduction < 0 || this.paymentList.freightDeduction > 100000) {
-          this.$message({
-            message: '运费扣款范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.freightDeduction < 0 || this.paymentList.freightDeduction > 100000) {
+      //     this.$message({
+      //       message: '运费扣款范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
       
-        if (this.paymentList.unloadSubsidy < 0 || this.paymentList.unloadSubsidy > 100000) {
-          this.$message({
-            message: '卸车补助范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.unloadSubsidy < 0 || this.paymentList.unloadSubsidy > 100000) {
+      //     this.$message({
+      //       message: '卸车补助范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
       
-        if (this.paymentList.unloadDeduction < 0 || this.paymentList.unloadDeduction > 100000) {
-          this.$message({
-            message: '卸车扣款范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.unloadDeduction < 0 || this.paymentList.unloadDeduction > 100000) {
+      //     this.$message({
+      //       message: '卸车扣款范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
        
-        if (this.paymentList.otherSubsidy < 0 || this.paymentList.unloadDeduction > 100000) {
-          this.$message({
-            message: '其他补助范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.otherSubsidy < 0 || this.paymentList.unloadDeduction > 100000) {
+      //     this.$message({
+      //       message: '其他补助范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
        
-        if (this.paymentList.qualityDeduction < 0 || this.paymentList.qualityDeduction > 100000) {
-          this.$message({
-            message: '质量扣款范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.qualityDeduction < 0 || this.paymentList.qualityDeduction > 100000) {
+      //     this.$message({
+      //       message: '质量扣款范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
       
-        if (this.paymentList.otherDeduction < 0 || this.paymentList.otherDeduction > 100000) {
-          this.$message({
-            message: '其他扣款范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
-      //   if (
-      //   String(this.paymentList.actualPayment).indexOf('.') != -1 &&
-      //   String(this.paymentList.actualPayment).length -
-      //     (String(this.paymentList.actualPayment).indexOf('.') + 1) >
-      //     2
-      // ) {
-      //   this.$message({
-      //     message: '毛重输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-        if (this.paymentList.actualPayment < 0 || this.paymentList.otherDeduction > 100000) {
-          this.$message({
-            message: '实际付款范围应在0-100000内',
-            type: 'warning',
-          })
-          return
-        }
-        if (this.paymentList.remarks.length > 20) {
-          this.$message({
-            message: '记事字数应在0-20个字',
-            type: 'warning',
-          })
-          return
-        }
+      //   if (this.paymentList.otherDeduction < 0 || this.paymentList.otherDeduction > 100000) {
+      //     this.$message({
+      //       message: '其他扣款范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
+      //   if (this.paymentList.actualPayment < 0 || this.paymentList.otherDeduction > 100000) {
+      //     this.$message({
+      //       message: '实际付款范围应在0-100000内',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
+      //   if (this.paymentList.remarks.length > 20) {
+      //     this.$message({
+      //       message: '记事字数应在0-20个字',
+      //       type: 'warning',
+      //     })
+      //     return
+      //   }
+
       this.paymentList.id=this.$route.query.id 
       this.paymentList.settlementClerk =  sessionStorage.getItem('ws-pf_staffName')
       postpaymentedit(this.paymentList).toPromise().then((response) => {
-          this.$router.push({ path: 'houseSelfCollectPrint',
-            query:{
-          name:"123"
-        }
-        })
+         getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
+             this.printData= response
+         })
+         this.isShowPrint = true
+           
+        //   this.$router.push({ path: 'houseSelfCollectPrint',
+        //     query:{
+        //   name:"123"
+        // }
+        // })
         },
         )
     },
@@ -662,6 +711,7 @@ export default {
       
     },
     cancel() {
+      this.paymentList = [] 
       this.$router.push({ path: 'paymentManagement' })
     },
   },
@@ -689,12 +739,12 @@ export default {
 /deep/.ws-info-table .el-form-item .el-form-item__content {
   border: none;
 }
-.title {
+.titles {
   font-size: 16px;
   font-weight: 600;
   margin: 10px;
 }
-.title::before {
+.titles::before {
   content: '';
   display: inline-block;
   width: 5px;
@@ -750,4 +800,43 @@ export default {
       overflow: scroll;
     height: 86vh;
 }
+/deep/.el-table .el-table__header .cell,
+.el-table .el-table__body .cell {
+  text-align: center;
+}
+/deep/.el-table--enable-row-transition .el-table__body td {
+  text-align: center;
+}
+.title{
+  padding:10px;
+  text-align:center;
+}
+
+/deep/.el-dialog__title {
+  font-size: 24px !important;
+}
+/deep/.el-dialog__header {
+  text-align: center !important;
+  padding: 10px 0 !important;
+  height: auto !important;
+}
+.title {
+  font-size: 16px;
+  font-weight: 600;
+}
+table,
+table tr th,
+table tr td {
+  border: 2px solid #333333;
+  padding: 5px 0;
+}
+
+table {
+  width: 100%;
+  min-height: 25px;
+  line-height: 25px;
+  text-align: center;
+  border-collapse: collapse;
+  border: 3px solid #333333;
+}
 </style>

+ 30 - 1
src/views/houseSelfCollect/weighingManagement.vue

@@ -74,7 +74,21 @@
       <el-table-column
         prop="suqualityTestingDate"
         label="称重时间"
-      ></el-table-column>
+      >
+        <template slot-scope="scope">
+          <sapn
+            v-if="
+              scope.row.status == '已称毛重'
+            "
+            > {{scope.row.grossDate}}</sapn
+          >
+         <sapn
+            v-if="
+              scope.row.status == '已称皮重'
+            "
+            > {{scope.row.tareDate}}</sapn
+          >
+        </template></el-table-column>
       <el-table-column prop="status" label="状态"></el-table-column>
       <el-table-column width="300" prop="contractNo1" label="操作">
         <template slot-scope="scope">
@@ -118,6 +132,11 @@
       title="粮食检斤单"
     >
       <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
+      <div style="text-align:center">
+      <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+      <el-button type="primary" @click="printSmall">打印小票</el-button>
+      <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -162,6 +181,16 @@ export default {
    
   },
   methods: {
+     printSmall() {
+      window.location.href =
+        '../../../../static/weightCheck.html?type=1&tableData=' +
+        JSON.stringify(this.dialogData)
+    },
+    printBig() {
+      window.location.href =
+        '../../../../static/weightCheck.html?type=2&tableData=' +
+        JSON.stringify(this.dialogData)
+    },
     print(row) {
        getPrint({
       id:row.id

+ 15 - 10
src/views/houseSelfCollect/weightCheck.vue

@@ -162,11 +162,15 @@
       :visible.sync="isShowPrint"
       title="粮食检斤单"
       @close="closeDialog"
+      
     >
-      <weightCheckPrint :tableData="inspect"></weightCheckPrint>
-      <el-button type="primary" @click="inspect = false">关闭</el-button>
+      <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
+      <div style="text-align:center">
+      <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
       <el-button type="primary" @click="printSmall">打印小票</el-button>
       <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+      
     </el-dialog>
   </div>
 </template>
@@ -178,6 +182,8 @@ import {
   getPrint,
 } from '@/model/houseSelfCollect/index'
 import weightCheckPrint from './component/weightCheckPrint.vue'
+  import html2canvas from "html2canvas"
+  import axios from "axios"
 export default {
   components: {
     weightCheckPrint,
@@ -197,6 +203,7 @@ export default {
       warehouseId: '',
       purchasePriceList: [],
       isShowPrint: false,
+      tableData:{}
     }
   },
   activated() {
@@ -239,20 +246,19 @@ export default {
     printSmall() {
       window.location.href =
         '../../../../static/weightCheck.html?type=1&tableData=' +
-        JSON.stringify(this.tableData)
+        JSON.stringify(this.inspect)
     },
     printBig() {
       window.location.href =
         '../../../../static/weightCheck.html?type=2&tableData=' +
-        JSON.stringify(this.tableData)
+        JSON.stringify(this.inspect)
     },
     closeDialog() {
       html2canvas(this.$refs.saveImg.$el).then((canvas) => {
         let dataURL = canvas.toDataURL('image/png')
         this.imgUrl = dataURL
         if (this.imgUrl !== '') {
-          let b = this.dataURLtoFile(this.imgUrl, 'aa')
-          console.log(b)
+          let b = this.dataURLtoFile(this.imgUrl, 'printImage')
           let formdata = new FormData()
           formdata.append('file', b)
           axios({
@@ -262,11 +268,10 @@ export default {
           }).then((response) => {
             //编辑接口
             this.weighingList.pictureAddress = response.data.url
-            getinspectEdit(this.weighingList)
+            tare(this.weighingList)
               .toPromise()
               .then((response) => {})
           })
-
           this.dialogTableVisible = true
         }
       })
@@ -405,7 +410,6 @@ export default {
               tare(this.weighingList)
                 .toPromise()
                 .then((response) => {
-                  console.log(response)
                   this.$notify.success({
                     title: '成功',
                     message: '保存成功',
@@ -416,8 +420,9 @@ export default {
                     .toPromise()
                     .then((response) => {
                       this.inspect = response
+                      this.inspect.a = "中天"
+                      // this.tableData = response
                       this.isShowPrint = true
-                      console.log(this.dialogData)
                     })
                     .catch((response) => {
                       // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 116 - 16
src/views/outboundManagement/weighing.vue

@@ -58,17 +58,17 @@
 						</ws-form-item>
 						<el-button type="primary" v-if="this.types == 2 || this.types == null">重新获取</el-button>
 						<!-- <div class="formItem"> -->
-							<ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="this.types == 1">
-								<ws-input v-model="weighingList.netWeight" placeholder="请输入净重" maxlength="100"
-									size="small" disabled />
-							</ws-form-item>
+						<ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="this.types == 1">
+							<ws-input v-model="weighingList.netWeight" placeholder="请输入净重" maxlength="100" size="small"
+								disabled />
+						</ws-form-item>
 						<!-- </div> -->
 						<div class="bangdan">
 							<el-form-item label="上传磅单" v-if="this.types == 1">
 							</el-form-item>
 							<el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
-								:on-success="(res, file) => {handlePictureCardPreview1(res)}" :on-remove="(value) => {handleRemove(value)}" class="photo2"
-								v-if="this.types == 1">
+								:on-success="(res, file) => {handlePictureCardPreview1(res)}"
+								:on-remove="(value) => {handleRemove(value)}" class="photo2" v-if="this.types == 1">
 								<i class="el-icon-plus"></i>
 							</el-upload>
 							<el-dialog :visible.sync="dialogVisible" v-if="this.types == 1">
@@ -105,13 +105,13 @@
 					storageNumber: '',
 					buckleMiscellaneous: 0,
 					compId: sessionStorage.getItem('ws-pf_compId'),
-					warehouseName: '',
 				},
 				disabled: false,
 				disabled1: false,
 				disabled2: false,
 				dialogVisible: false,
 				getbinNumberList: [],
+				warehouseName: '',
 				contractNoList: [],
 				inOutType: [{
 						value: '销售出库',
@@ -142,6 +142,7 @@
 			this.weighingList.carNumber = this.$route.query.carNumber
 			this.weighingList.goodsName = this.$route.query.goodsName
 			this.weighingList.inOutType = this.$route.query.inOutType
+			this.warehouseName = this.$route.query.warehouseName
 			let id = this.$route.query.id
 			this.relationId = this.$route.query.relationId
 			this.warehouseId = this.$route.query.warehouseId
@@ -222,8 +223,110 @@
 					})
 			},
 			print() {
-				(this.weighingList.secretaryWeigher =
-					sessionStorage.getItem('ws-pf_staffName')),
+				if (this.types == null || this.types == 2) {
+					if (!this.weighingList.contractNo) {
+						this.$message({
+							message: '合同编号不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					if (!this.weighingList.binNumber) {
+						this.$message({
+							message: '仓位号不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					if (!this.weighingList.storageNumber) {
+						this.$message({
+							message: '囤位号不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					if (
+						this.weighingList.storageNumber.length < 1 ||
+						this.weighingList.storageNumber.length > 10
+					) {
+						this.$message({
+							message: '囤位号不超过10个字符!',
+							type: 'warning',
+						})
+						return
+					}
+					if (!this.weighingList.carNumber) {
+						this.$message({
+							message: '车牌号不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					if (
+						this.weighingList.carNumber.length != 7
+					) {
+						this.$message({
+							message: '车牌号输入错误',
+							type: 'warning',
+						})
+						return
+					}
+					if (!this.weighingList.inOutType) {
+						this.$message({
+							message: '出库类型不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					// if (!this.weighingList.tare) {
+					// 	this.$message({
+					// 		message: '皮重不能为空',
+					// 		type: 'warning',
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	isNaN(this.weighingList.tare) ||
+					// 	(String(this.weighingList.tare).indexOf('.') != -1 &&
+					// 		String(this.weighingList.tare).length -
+					// 		(String(this.weighingList.tare).indexOf('.') + 1) >
+					// 		1) ||
+					// 	this.weighingList.tare < 1 ||
+					// 	this.weighingList.tare > 100000
+					// ) {
+					// 	this.$message({
+					// 		message: '皮重输入错误!',
+					// 		type: 'warning',
+					// 	})
+					// 	return
+					// }
+				}
+				if (this.types == 1) {
+					if (!this.weighingList.grossWeight) {
+						this.$message({
+							message: '毛重不能为空',
+							type: 'warning',
+						})
+						return
+					}
+					if (
+						isNaN(this.weighingList.grossWeight) ||
+						(String(this.weighingList.grossWeight).indexOf('.') != -1 &&
+							String(this.weighingList.grossWeight).length -
+							(String(this.weighingList.grossWeight).indexOf('.') + 1) >
+							1) ||
+						this.weighingList.grossWeight < 1 ||
+						this.weighingList.grossWeight > 100000
+					) {
+						this.$message({
+							message: '毛重输入错误!',
+							type: 'warning',
+						})
+						return
+					}
+				}
+				this.weighingList.warehouseName = this.warehouseName
+				this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName')
 				this.$confirm('确定保存检斤信息?', '提示', {
 						confirmButtonText: '确定',
 						cancelButtonText: '取消',
@@ -243,8 +346,7 @@
 										path: 'weighingManagement'
 									})
 								})
-								.catch((response) => {
-								})
+								.catch((response) => {})
 						} else if (this.types == 2) {
 							this.weighingList.warehouseId = this.warehouseId
 							tareEdit(this.weighingList)
@@ -258,11 +360,10 @@
 										path: 'weighingManagement'
 									})
 								})
-								.catch((response) => {
-								})
+								.catch((response) => {})
 						} else if (this.types == null) {
 							this.weighingList.warehouseId = this.warehouseId
-							tareAdd(this.weighingList,this.warehouseName)
+							tareAdd(this.weighingList)
 								.toPromise()
 								.then((response) => {
 									this.$notify.success({
@@ -273,8 +374,7 @@
 										path: 'weighingManagement'
 									})
 								})
-								.catch((response) => {
-								})
+								.catch((response) => {})
 						}
 					})
 					.catch(() => {

+ 1 - 0
src/views/outboundManagement/weighingManagement.vue

@@ -148,6 +148,7 @@
 						netWeight: row.netWeight,
 						relationId: row.relationId,
 						warehouseId: this.warehouseId,
+						warehouseName: this.warehouseName,
 					},
 				})
 			},

+ 17 - 2
src/views/warehouse/warehouseManagementAdd.vue

@@ -70,7 +70,21 @@
             size="small"
           />
         </ws-form-item>
-
+        <!--其他负责人-->
+        <ws-form-item label="其他负责人"  span="1" prop="otherPersonCharge">
+          <el-select
+            v-model="deptBudgetList.otherPersonCharge"
+            placeholder="请选择其他负责人"
+            multiple
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </el-select>
+        </ws-form-item>
         <!--仓库所在地-->
         <ws-form-item label="仓库所在地" span="1" prop="acceptanceMethod">
           <el-cascader
@@ -118,8 +132,8 @@
           style="width: 100%"
           class="flex position"
           v-for="(item, index) in freightspace"
-          :key="index"
           v-show="radio == 1"
+          :key="index"
         >
           <ws-form-item
             label="仓位编号"
@@ -498,6 +512,7 @@ export default {
           .then(() => {
             this.$refs.deptBudgetList.validate((valid) => {
               if (valid) {
+                this.deptBudgetList.otherPersonCharge=this.deptBudgetList.otherPersonCharge.toString()
                 this.deptBudgetList.compId =
                   sessionStorage.getItem('ws-pf_compId')
                 this.deptBudgetList.warehousePrivate =

+ 17 - 0
src/views/warehouse/warehouseManagementEdit.vue

@@ -77,6 +77,21 @@
               size="small"
             />
           </ws-form-item>
+          <!--其他负责人-->
+        <ws-form-item label="其他负责人"  v-if="warehouseType == 1" span="1" prop="otherPersonCharge">
+          <el-select
+            v-model="deptBudgetList.otherPersonCharge"
+            placeholder="请选择其他负责人"
+            multiple
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </el-select>
+        </ws-form-item>
           <!--仓库所在地-->
           <ws-form-item label="仓库所在地" span="1" prop="warehouseCity">
             <el-cascader
@@ -504,6 +519,7 @@ export default {
           //   this.fileList =  this._getFileList(this.deptBudgetList.addressUrl)
           // }
           this.addressUrls = this.deptBudgetList.addressUrl.split(',')
+           this.deptBudgetList.otherPersonCharge=this.deptBudgetList.otherPersonCharge.split(',')
           this.addressUrls.pop()
         })
     },
@@ -636,6 +652,7 @@ export default {
           this.deptBudgetList.baseId = this.baseId
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
+           this.deptBudgetList.otherPersonCharge=this.deptBudgetList.otherPersonCharge.toString()
           edit(this.deptBudgetList)
             .toPromise()
             .then((response) => {

+ 3 - 0
src/views/warehouse/warehouseManagementLook.vue

@@ -62,6 +62,9 @@
             class="readonly"
           >
             {{ deptBudgetList.personPhone }}
+          </ws-form-item>
+           <ws-form-item label="其他负责人" span="1" prop="otherPersonCharge">
+            {{ deptBudgetList.otherPersonCharge }}
           </ws-form-item>
           <!--仓库所在地-->
           <ws-form-item label="仓库所在地" span="1" prop="warehouseLocation">