高敬炎 hace 2 años
padre
commit
569c315008
Se han modificado 1 ficheros con 118 adiciones y 36 borrados
  1. 118 36
      src/views/record/record.vue

+ 118 - 36
src/views/record/record.vue

@@ -74,13 +74,18 @@
         </el-table-column>
         <el-table-column prop="address" label="更多指标" >
           <template slot-scope="scope">
+<<<<<<< HEAD
             <div v-if="scope.row.carNumber!='盘盈'&&scope.row.carNumber!='盘亏'" @click="moreindicator(scope.row)" style="color:cornflowerblue">查看</div>
+=======
+            <div style="color:cornflowerblue" @click="moreInfo(scope.row)">查看</div>
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
           </template>
         </el-table-column>
         <el-table-column prop="unitPrice" label="单价(元/吨)" width="100">
         </el-table-column>
         <el-table-column prop="grainFund" label="粮款(元)" show-overflow-tooltip>
         </el-table-column>
+<<<<<<< HEAD
         <el-table-column prop="address" label="备注" >
           <template slot-scope="scope">
             <el-popover v-if="scope.row.remark"
@@ -92,6 +97,11 @@
             <div slot="reference" style="color:cornflowerblue">查看</div>
           </el-popover>
             
+=======
+        <el-table-column prop="address" label="备注" show-overflow-tooltip>
+          <template slot-scope="scope" v-if="scope.row.remark">
+            <div style="color:cornflowerblue" @click="lookRemark(scope.row.remark)">查看</div>
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
           </template>
         </el-table-column>
         <el-table-column prop="createDate" label="日期" width="140">
@@ -181,7 +191,39 @@
         </el-form-item>
       </el-form>
     </el-dialog>
+<<<<<<< HEAD
     <el-dialog width="320px" :close-on-click-modal="false" :title="inventoryTitle" :visible.sync="isShowInventory" :append-to-body="true"
+=======
+    <el-dialog width="320px" title="备注信息" :visible.sync="isShowRemark" :append-to-body="true" :close="remarkClose">
+      {{ remarkVal }}
+    </el-dialog>
+    <el-dialog width="320px" title="指标信息" :visible.sync="isShowMoreInfo" :append-to-body="true" :close="moreInfoClose">
+      <el-form class="customer" label-position="right" label-width="80px">
+        <el-form-item label="水分">
+          <el-input disabled size="small" v-model="moreInfoObj.waterContent" />
+        </el-form-item>
+        <el-form-item label="杂质">
+          <el-input disabled size="small" v-model="moreInfoObj.impurity" />
+        </el-form-item>
+        <el-form-item label="霉变粒">
+          <el-input disabled size="small" v-model="moreInfoObj.mildewGrain" />
+        </el-form-item>
+        <el-form-item label="不完善粒">
+          <el-input disabled size="small" v-model="moreInfoObj.imperfectGrain" />
+        </el-form-item>
+        <el-form-item label="容重">
+          <el-input disabled size="small" v-model="moreInfoObj.bulkDensity" />
+        </el-form-item>
+        <el-form-item label="热损伤">
+          <el-input disabled size="small" v-model="moreInfoObj.jiaorenli" />
+        </el-form-item>
+        <el-form-item label="蛋白">
+          <el-input disabled size="small" v-model="moreInfoObj.protein" />
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+    <el-dialog width="320px" :title="inventoryTitle" :visible.sync="isShowInventory" :append-to-body="true"
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
       :close="inventoryClose">
       <el-form class="customer" label-position="right" label-width="120px">
         <el-form-item class="customer-item" label="货名">
@@ -224,8 +266,8 @@
 <script>
 import WsUpload from '@/components/WsUpload'
 import {
-    downloadFile
-  } from '@/utils/batchDown'
+  downloadFile
+} from '@/utils/batchDown'
 import {
   dayjs,
   EventBus
@@ -247,6 +289,10 @@ export default {
   },
   data() {
     return {
+      moreInfoObj:{},
+      isShowMoreInfo:false,
+      remarkVal: '',
+      isShowRemark: false,
       dataObj: {},
       size: 10,
       pSubmitObj: {
@@ -280,7 +326,6 @@ export default {
       multipleSelection: [],
       goodsList: [],
       value: '',
-      value1: '',
       searchKeyWord: '',
       value2: '',
       status: '',
@@ -301,10 +346,28 @@ export default {
 
   },
   methods: {
+<<<<<<< HEAD
     moreindicator(row){
       this.goodindexObj=row
       this.isShowindex=true
     },
+=======
+    moreInfoClose(){
+      this.isShowMoreInfo = false
+    },
+    //更多指标
+    moreInfo(val) { 
+      this.moreInfoObj = val
+      console.log(this.moreInfoObj)
+      this.isShowMoreInfo = true
+    },
+    // 查看备注
+    lookRemark(val) {
+      this.remarkVal = val
+      this.isShowRemark = true
+    },
+    // 更改已付、未付、已收、未收状态
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
     changeStatus(val) {
       if (val.status == '已付') {
         val.status = "未付"
@@ -325,6 +388,7 @@ export default {
           }
         })
     },
+    //计算盘盈盘亏货值
     inputVal() {
       if (this.pSubmitObj.netWeight && this.pSubmitObj.unitPrice) {
         this.pSubmitObj.grainFund = this.pSubmitObj.netWeight * this.pSubmitObj.unitPrice
@@ -340,6 +404,7 @@ export default {
         this.pSubmitObj.inOutFlag = 2
         this.pSubmitObj.noFlag = 'PY'
       }
+<<<<<<< HEAD
       
       // //查看编号
       // await selectInOutCount({
@@ -350,6 +415,8 @@ export default {
       //     this.pSubmitObj.noFlag = res
       //   })
       // console.log(this.pSubmitObj)
+=======
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
       await speedWarehouseInOutInfoAdd(this.pSubmitObj).toPromise()
         .then((res) => {
           this.$message.success('提交成功!')
@@ -360,6 +427,7 @@ export default {
           this.getList()
         })
     },
+    // 查看客户
     selectCustomer(val) {
       speedCustomerInfo({
         customerId: val.customerId
@@ -370,6 +438,7 @@ export default {
           this.customerObj = response
         })
     },
+    //搜索
     search(type) {
       switch (type) {
         case 0:
@@ -388,21 +457,23 @@ export default {
       }
       this.getList()
     },
+    //选择货名
     changeGoodsName(val) {
-      console.log(val)
       this.goodsObj = this.goodsList.filter((item) => {
         if (val == item.goodsName) return item
       })[0]
+<<<<<<< HEAD
       this.storage =''
       this.weightedCost=''
       console.log(this.goodsObj)
+=======
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
     },
+    //盘盈盘亏选择货名
     changeGoodsName1(val) {
-      console.log(val)
       this.goodsObj1 = this.goodsList.filter((item) => {
         if (val == item.goodsName) return item
       })[0]
-      console.log(this.goodsObj)
     },
     dateFormat(fmt, date) {
       let ret
@@ -436,13 +507,17 @@ export default {
       }
       this.getList()
     },
+<<<<<<< HEAD
     getGoodSName(status) {
+=======
+    //货名下拉
+    getGoodSName() {
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
       speedGoodsList({
         compId: localStorage.getItem('ws-pf_compId')
       })
         .toPromise()
         .then((response) => {
-          console.log(response)
           this.goodsList = response
           if (this.goodsList.length != 0) {
             for (let i = 0; i < response.length; i++) {
@@ -493,7 +568,6 @@ export default {
       })
         .toPromise()
         .then((response) => {
-          console.log(response)
           if (response.records) {
             for (let i = 0; i < response.records.length; i++) {
               response.records[i].addressUrlArray = []
@@ -507,25 +581,25 @@ export default {
         })
     },
     async exportExcel() {
-      if(this.multipleSelection.length==0){
+      if (this.multipleSelection.length == 0) {
         this.$message.error("请勾选导出条目!")
         return
       }
       const {
-          data
-        } = await exportOrder({
-          speedWarehouseInOutInfoList:this.multipleSelection
-        }, {}, {
-          responseType: 'blob',
-        }).toPromise()
-        downloadFile({
-          res: data,
-          fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_出入库记录`,
-          type: 'xls',
-        })
+        data
+      } = await exportOrder({
+        speedWarehouseInOutInfoList: this.multipleSelection
+      }, {}, {
+        responseType: 'blob',
+      }).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${this.date.year + (this.date.month ? `-${this.date.month}` : '')
+          }_出入库记录`,
+        type: 'xls',
+      })
     },
+    // 批量收付款
     batchPay(val) {
       if (this.multipleSelection.length==0) {
             this.$message.error('暂未勾选条目!')
@@ -549,6 +623,7 @@ export default {
         for (let i = 0; i < this.multipleSelection.length; i++) {
           if (this.multipleSelection[i].status == '已收' || this.multipleSelection[i].status == '未收'|| this.multipleSelection[i].status == '已付') {
             this.$message.error('请勾选待付款的入库条目!')
+
             return
           }
         }
@@ -560,14 +635,14 @@ export default {
         type: 'warning'
       }).then(() => {
 
-        speedWarehouseInOutInfoEdit({flag:_flag,speedWarehouseInOutInfoList:this.multipleSelection}).toPromise()
-        .then((res) => {debugger
-          if (res == "OK") {
-            this.$message.success('提交成功!')
-            this.isShowInventory = false
-            this.getList()
-          }
-        })
+        speedWarehouseInOutInfoEdit({ flag: _flag, speedWarehouseInOutInfoList: this.multipleSelection }).toPromise()
+          .then((res) => {
+            if (res == "OK") {
+              this.$message.success('提交成功!')
+              this.isShowInventory = false
+              this.getList()
+            }
+          })
 
       }).catch(() => {
         return false
@@ -579,6 +654,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
+<<<<<<< HEAD
         speedWarehouseInOutInfoDel({id:val.id}).toPromise().then(() => {
           this.$message({
               type: 'success',
@@ -586,10 +662,19 @@ export default {
             });
             this.getList()
         })
+=======
+        speedWarehouseInOutInfoDel({ id: val.id}).toPromise()
+          .then((res) => {
+              this.$message.success('删除成功!')
+              this.getList()
+          })
+
+>>>>>>> 82bcf6d154fbd300e527c36418d489744c1d142e
       }).catch(() => {
         return false
       });
     },
+    // 归零
     zero() {
       if(this.multipleSelection.length==0){
         this.$message.error('暂未勾选条目!')
@@ -633,7 +718,6 @@ export default {
     },
     //盘亏盘盈
     handlestatus(type) {
-      console.log(type)
       if (type == 1) {
         this.inventoryTitle = '盘亏'
       } else {
@@ -641,6 +725,9 @@ export default {
       }
       this.isShowInventory = true
     },
+    remarkClose() {
+      this.isShowRemark = false
+    },
     customerclose() {
       this.isShowCustomer = false
     },
@@ -682,16 +769,13 @@ export default {
       this.accessoryTFs = true
       this.dataObj = row
       this.appendixIdss = row.addressUrl
-      console.log(this.appendixIdss)
     },
     handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
       this.pageSize = val
       this.getList()
     },
     handleCurrentChange(val) {
       this.currentPage = val
-      console.log(`当前页: ${val}`)
       this.getList()
     },
     toggleSelection(rows) {
@@ -704,9 +788,7 @@ export default {
       }
     },
     handleSelectionChange(val) {
-      debugger
       this.multipleSelection = val;
-      console.log('勾选条目', val)
     },
     lookup() {
       this.getList()