Redeem пре 1 година
родитељ
комит
6e8b81c133

+ 1 - 1
build/utils.js

@@ -19,7 +19,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 // let devModules = ['all']
 // let devModules = ['index', 'statisticalReport']
 let devModules = ['all']
-// let devModules = ['index', 'OYE', 'statisticalReport', 'sale', 'appoint']
+// let devModules = ['index', 'OYE', 'statisticalReport']
 
 if (pathSrc.indexOf('node_modules') > -1) {
   devModules = require('../../../cors.js').devModules

+ 6 - 2
src/components/DilCommonUI/packages/table/src/table.js

@@ -104,6 +104,8 @@ export default {
               //执行成功的回调
               this.$emit('func', response.data.data)
               this.refreshColumnData(d.columnData)
+              this.$refs.mainTable.clearSelectionFun()
+
               //this.$refs.mainTable.getTableConfig();
               this.isShow = true
               this.loading = false
@@ -131,6 +133,8 @@ export default {
               //执行成功的回调
               this.$emit('func', response.data.data)
               this.refreshColumnData(d.columnData)
+              this.$refs.mainTable.clearSelection()
+
               //this.$refs.mainTable.getTableConfig();
               this.isShow = true
               this.loading = false
@@ -301,10 +305,10 @@ export default {
           mw += 20
         }
         if (item.filters && item.filters.length > 0) {
-          mw += 10
+          mw += 30
         }
         if (item.label) {
-          mw += item.label.toString().length * 25
+          mw += item.label.toString().length * 30
         }
         return mw
       }

+ 19 - 8
src/components/DilCommonUI/packages/table/src/table.vue

@@ -8,6 +8,8 @@
       :stripe="stripe"
       :border="border"
       :cell-class-name="cellClassName"
+      :cell-style="cellStyle"
+      :header-row-style="headerRowStyle"
       :height="height"
       :max-height="maxHeight"
       :highlight-current-row="highlightCurrentRow"
@@ -75,7 +77,6 @@
         :key="item.data_id || 'auto_' + index"
         v-bind="item"
         :column-key="dataDropColumn[index].prop"
-        :filter="item.isFilter ? true : false"
         :align="item.align || align"
         :sortable="dataSortable(item)"
         :show-overflow-tooltip="item.showOverflowTooltip || showOverflowTooltip"
@@ -121,6 +122,7 @@
 
 <script>
 import table from './table.js'
+import { accAdd, accDiv, accSub, accMul } from '@/utils/util.js'
 export default {
   name: 'DilTable',
   extends: table,
@@ -226,7 +228,16 @@ export default {
         return ({ row, rowIndex }) => ''
       }
     },
-
+    cellStyle: {
+      default() {
+        return ({ row, rowIndex }) => ''
+      }
+    },
+    headerRowStyle: {
+      default() {
+        return ({ row, rowIndex }) => ''
+      }
+    },
     // 是否启用分页器
     isPagination: {
       default: true
@@ -277,11 +288,12 @@ export default {
     // 刷新表格数据
     refreshData() {
       console.log('刷新表格数据')
+      console.log('我尽力了')
       this.requestDataDebounce()
       // 多选表格清空用户的选择
-      if (this.isClear != '1') {
-        this.$refs.mainTable.clearSelection()
-      }
+      this.$refs.mainTable.clearSelectionFun()
+      // if (this.isClear != '1') {
+      // }
     },
     rowDbClick(row) {
       this.$emit('rowDbClick', row)
@@ -300,19 +312,18 @@ export default {
           sums[index] = '合计'
           return
         }
-        console.log(column)
         if (this.showSummaryList.includes(column.property)) {
           const values = data.map(item => Number(item[column.property]))
           if (!values.every(value => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr)
               if (!isNaN(value)) {
-                return prev + curr
+                return accAdd(prev, curr)
               } else {
                 return prev
               }
             }, 0)
-            sums[index] = sums[index].toFixed(3)
+            // sums[index] = sums[index]
           } else {
             sums[index] = 'N/A'
           }

+ 340 - 0
src/views/OYE/components/exportTranPlan.js

@@ -0,0 +1,340 @@
+import { sjTime, isNumber } from '@/utils/sharedJsFile'
+export default {
+  data() {
+    return {
+      tableData: [],
+      shipperName: '四川省达州钢铁有限责任公司',
+      //销售订单主表数据
+      saleOrderList: [
+        'receiveName',
+        'isSelfMention',
+        'saleRemark',
+        'saleOrderReceiveCustomer',
+        'salerName',
+        'saleOrderNo',
+        'saleArea'
+      ],
+      saleOrderMapList: [
+        'cxh',
+        'province',
+        'district',
+        'town',
+        'truckRemark',
+        'place',
+        'saleOrderConsigneeTel',
+        'saleDateOfReceipt',
+        'materialName',
+        'materialSpecification',
+        'materialModel',
+        'orderPlanWeight',
+        'meterNumber',
+        'isPoundSale',
+        'inboundWarehouse'
+      ]
+    }
+  },
+  methods: {
+    importExcel(file) {
+      let that = this
+      if (!file) {
+        that.$message({
+          message: '文件错误!',
+          type: 'warning'
+        })
+        return
+      }
+      this.tableData = []
+      var reader = new FileReader()
+      var data = null
+      var workbook = null
+      //设置读取操作
+      reader.onload = function(e) {
+        data = e.target.result
+        workbook = XLSX.read(data, {
+          type: 'binary'
+        })
+        let rows = XLSX.utils.sheet_to_json(
+          workbook.Sheets[workbook.SheetNames[0]]
+        ) //只取第一页
+        console.log(rows, 'rows')
+        let uuid = Math.floor(Math.random() * 60 * 24)
+        Array.from(rows).forEach((e, index) => {
+          let map = {}
+          try {
+            Object.keys(e).forEach(e1 => {
+              console.log(e1, 'e1')
+              if (e1.includes('转运计划编号')) {
+                map.saleOrderNo = e[e1]
+              }
+              if (e1.includes('物资名称')) {
+                map.materialName = e[e1]
+                if (
+                  e[e1].includes('盘螺') ||
+                  e[e1].includes('乱尺') ||
+                  e[e1].includes('盘元') ||
+                  e[e1].includes('盘圆')
+                ) {
+                  map.isPoundSale = 0
+                } else {
+                  map.isPoundSale = 1
+                }
+                //确定更改的物资有无米数
+                if (e[e1].includes('米')) {
+                  map.meterNumber = Number(e[e1].replace(/[^0.0-9.0]/gi, ''))
+                } else {
+                  map.meterNumber = null
+                }
+              }
+              if (e1.includes('规格型号')) {
+                // console.log(e[e1])
+                let str = e[e1]
+                let regex = /\((.+?)\)/g
+                if (str.match(regex) != null) {
+                  let spa = str.replace(str.match(regex)[0], '')
+                  let model = str
+                    .match(regex)[0]
+                    .replace('(', '')
+                    .replace(')', '')
+                  map.materialModel = model
+                  if ((spa + '').includes('Φ')) {
+                    map.materialSpecification = spa
+                  } else {
+                    map.materialSpecification = 'Φ' + spa
+                  }
+                } else {
+                  map.materialSpecification = e[e1]
+                  map.model = null
+                }
+              }
+              if (e1.includes('下单客户')) {
+                map.receiveName = e[e1]
+              }
+              if (
+                e1.includes('米数') &&
+                (map.meterNumber == null || map.meterNumber != '')
+              ) {
+                map.meterNumber = e[e1]
+              }
+              if (e1.includes('物资规格') && !e1.includes('规格型号')) {
+                if ((e[e1] + '').includes('Φ')) {
+                  map.materialSpecification = e[e1]
+                } else {
+                  map.materialSpecification = 'Φ' + e[e1]
+                }
+              }
+              if (e1.includes('物资型号') && !e1.includes('规格型号')) {
+                map.materialModel = e[e1]
+              }
+              if (e1.includes('物资件数')) {
+                if (isNumber(e[e1])) {
+                  map.orderPlanWeight = e[e1]
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“物资件数”错误,请核实后再输入(件数输入整数)`
+                  )
+                }
+              }
+              if (e1.includes('车序号')) {
+                if (typeof e[e1] != 'undefined' && isNumber(e[e1])) {
+                  map.cxh = e[e1]
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“车序号”错误,请核实后再输入(车序号输入正整数)`
+                  )
+                }
+              }
+              // if (e1.includes('收款公司')) {
+              //   if (that.receivingCompany.indexOf(e[e1]) === -1) {
+              //     throw new Error(
+              //       `该Excel第--${index + 2}--行-“收款公司”错误,请核实后再输入`
+              //     )
+              //   } else {
+              //     map.saleOrderReceiveCustomer = e[e1]
+              //   }
+              // }
+              if (e1.includes('业务员')) {
+                map.salerName = e[e1]
+              }
+              if (e1.includes('摘要')) {
+                map.saleRemark = e[e1]
+              }
+              if (e1.includes('省')) {
+                map.province = e[e1]
+              }
+              if (e1.includes('市')) {
+                map.district = e[e1]
+              }
+              if (e1.includes('县/区')) {
+                map.town = e[e1]
+              }
+              if (e1.includes('具体收货地址')) {
+                map.place = e[e1]
+              }
+              if (e1.includes('收货客户电话')) {
+                map.saleOrderConsigneeTel = e[e1]
+              }
+              if (e1.includes('备注')) {
+                map.truckRemark = e[e1]
+              }
+              if (e1.includes('出库库房')) {
+                map.inboundWarehouse = e[e1]
+              }
+              if (e1.includes('是否自提')) {
+                if (e[e1] === '是' || e[e1] === '否') {
+                  map.isSelfMention = e[e1]
+                } else {
+                  map.isSelfMention = '否'
+                }
+              }
+            })
+            map.shipperName = that.shipperName
+            if (typeof map.isSelfMention === 'undefined') {
+              map.isSelfMention = '否'
+            }
+            if (typeof map.cxh === 'undefined') {
+              map.cxh = Number(
+                `${Math.floor(
+                  Math.random() *
+                    Math.random() *
+                    Math.random() *
+                    Math.random() *
+                    Math.random() *
+                    new Date().getTime() *
+                    10000000
+                )}${uuid}`
+              )
+            }
+            if (map.saleRemark && map.receiveName && map.materialName) {
+              that.tableData.push(map)
+            }
+          } catch (es) {
+            that.$message.error(es.message)
+          }
+        })
+        that.addExcelInport()
+        return
+      }
+      reader.readAsBinaryString(file.raw) //以二进制方式读取
+    },
+    addExcelInport() {
+      //加载虚拟
+      const loading = this.$loading({
+        lock: true,
+        text: '正在快马加鞭为您生成销售订单,请稍候',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      //遍历数组,根据摘要和下单客户自动给出销售订单编号
+      for (let i = 0; i < this.tableData.length; i++) {
+        if (i === 0) {
+          this.tableData[i].saleOrderNo = 1
+        } else {
+          let sortArr = this.tableData
+            .filter(e => {
+              return (
+                typeof e.saleOrderNo != 'undefined' &&
+                e.saleOrderNo != 'undefined' &&
+                isNumber(e.saleOrderNo)
+              )
+            })
+            .map(e => {
+              if (
+                typeof e.saleOrderNo != 'undefined' &&
+                e.saleOrderNo != 'undefined' &&
+                isNumber(e.saleOrderNo)
+              ) {
+                return e.saleOrderNo
+              }
+            })
+            .sort((a, b) => {
+              return a - b
+            })
+          //当大于0的时候,需要遍历整个数组,与之相等的有哪些
+          for (let j = 0; j < i; j++) {
+            if (
+              this.tableData[i].saleRemark === this.tableData[j].saleRemark &&
+              this.tableData[i].receiveName === this.tableData[j].receiveName &&
+              this.tableData[i].saleOrderReceiveCustomer ===
+                this.tableData[j].saleOrderReceiveCustomer
+            ) {
+              this.tableData[i].saleOrderNo = this.tableData[j].saleOrderNo
+              break
+            } else {
+              if (j == i - 1) {
+                this.tableData[i].saleOrderNo = sortArr[sortArr.length - 1] + 1
+              }
+            }
+          }
+        }
+      }
+      // this.tableData = this.tableData.sort(this.compare("saleOrderNo"));
+      // debugger;
+      //需要遍历数组,以销售订单编号为分类
+      const map1 = this.tableData.reduce((result, item) => {
+        result[item.saleOrderNo] = result[item.saleOrderNo] || []
+        result[item.saleOrderNo].push(item)
+        return result
+      }, {})
+      // result即为所求
+      let result = Object.values(map1)
+      console.log(result, 'resilt')
+      //遍历数组
+      let saleOrderListMap = []
+      result.forEach((saleOrderList, index) => {
+        let map = {}
+        let arr = []
+        saleOrderList.forEach(e => {
+          let mapMaterial = {}
+          Object.keys(e).forEach(e1 => {
+            if (this.saleOrderList.includes(e1)) {
+              map[e1] = e[e1]
+            }
+            if (this.saleOrderMapList.includes(e1)) {
+              mapMaterial[e1] = e[e1]
+            }
+          })
+          arr.push(mapMaterial)
+        })
+        map.shipperId = 1
+        map.mapList = arr
+        saleOrderListMap.push(map)
+      })
+      if (saleOrderListMap.length > 0) {
+        console.log(saleOrderListMap, 'saleOrderListMap')
+        this.axios
+          .post('/api/v1/ams/addTransPlanList', saleOrderListMap)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.getRequestUrl()
+              this.tableData = []
+              loading.close()
+              this.$message.success('新增转运计划成功!')
+            } else {
+              console.log(res.data.data)
+              this.$message.error(res.data.data)
+              this.getRequestUrl()
+              loading.close()
+              this.tableData = []
+            }
+          })
+          .catch(e => {
+            loading.close()
+            this.$message.error(e)
+            this.tableData = []
+          })
+      } else {
+        this.$message({
+          type: 'error',
+          duration: 3500,
+          offset: 250,
+          message:
+            '该Excel系统未识别到订单,请仔细检查格式。(销售订单必须在第一个sheet,且必须遵循导入模板!)'
+        })
+        this.tableData = []
+        loading.close()
+      }
+    }
+  }
+}

+ 31 - 5
src/views/OYE/components/oYeInbound.vue

@@ -58,7 +58,14 @@
       </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options"></dilTable>
+      <dilTable
+        v-bind.sync="options"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+        :showIndex="false"
+        :row-style="{ height: '35px' }"
+        :cell-style="returnClassName"
+      ></dilTable>
     </div>
   </div>
 </template>
@@ -124,7 +131,13 @@ export default {
       apiId: '529',
       orgCode: null,
       loginName: null,
-      inboundWarehouse: null
+      inboundWarehouse: null,
+      showSummaryList: [
+        'materialNumber',
+        'netWeight',
+        'theoryWeight',
+        'orderNetWeight'
+      ]
     }
   },
   created() {
@@ -132,9 +145,17 @@ export default {
     this.getRequestUrl()
   },
   methods: {
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+
     getInfo() {
       this.orgCode = getCookie('orgCode')
-      if (this.orgCode == 'shouhuokehu') {
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
         this.apiId = 537
         this.loginName = getCookie('loginName')
       } else if (this.orgCode == 'ouyechangwaiku') {
@@ -162,8 +183,9 @@ export default {
       let queryMap = {}
       queryMap[this.screen] = this.con
       queryMap[this.screen1] = this.con1
-      queryMap['consigneeName'] = this.loginName
-      queryMap['inboundWarehouse'] = this.inboundWarehouse
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
     search() {
@@ -182,5 +204,9 @@ export default {
     margin-left: 10px;
     margin-top: 10px;
   }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
 }
 </style>

+ 25 - 5
src/views/OYE/components/oYeOutbound.vue

@@ -58,7 +58,14 @@
       </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options"></dilTable>
+      <dilTable
+        v-bind.sync="options"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+        :showIndex="false"
+        :row-style="{ height: '35px' }"
+        :cell-style="returnClassName"
+      ></dilTable>
     </div>
   </div>
 </template>
@@ -119,7 +126,8 @@ export default {
       endTime: generateEndDate(),
       apiId: '530',
       orgCode: null,
-      loginName: null
+      loginName: null,
+      showSummaryList: ['materialNumber', 'netWeight', 'theoryWeight']
     }
   },
   created() {
@@ -127,9 +135,16 @@ export default {
     this.getRequestUrl()
   },
   methods: {
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
     getInfo() {
       this.orgCode = getCookie('orgCode')
-      if (this.orgCode == 'shouhuokehu') {
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
         this.apiId = 536
         this.loginName = getCookie('loginName')
       } else if (this.orgCode == 'ouyechangwaiku') {
@@ -156,8 +171,9 @@ export default {
       let queryMap = {}
       queryMap[this.screen] = this.con
       queryMap[this.screen1] = this.con1
-      queryMap['consigneeName'] = this.loginName
-      queryMap['inboundWarehouse'] = this.inboundWarehouse
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
 
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
@@ -177,5 +193,9 @@ export default {
     margin-left: 10px;
     margin-top: 10px;
   }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
 }
 </style>

+ 234 - 8
src/views/OYE/components/oYeRealTimeInventory.vue

@@ -35,17 +35,157 @@
           <el-input v-model="con1" style="width:200px" clearable></el-input>
         </el-form-item>
         <el-button type="primary" @click="search">查询</el-button>
+        <el-button
+          type="primary"
+          @click="addEditTime"
+          v-privilege="activeMenu + 'addEditTime'"
+          >划分实时库存</el-button
+        >
         <el-form-item></el-form-item>
       </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options"></dilTable>
+      <dilTable
+        v-bind.sync="options"
+        @radio-change="radioChange"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+        :showIndex="false"
+        :row-style="{ height: '30px' }"
+        :cell-style="returnClassName"
+      ></dilTable>
+    </div>
+    <div class="updateInsertForm">
+      <el-dialog :visible.sync="updateInsertVisible">
+        <div style="color: #000000;font-size: 16px;font-weight: 700;">
+          原有实时库存数据:
+        </div>
+        <el-form label-position="left">
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.consigneeName
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="saleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.saleArea
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.inboundWarehouse
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.materialName }}-{{
+                selectedRowData.materialSpe
+              }}-{{ selectedRowData.materialModel }};</span
+            ><span style="color:red;font-size: 16px;font-weight: 500;"
+              >物资单重为{{ selectedRowData.singleWeight }}t,{{
+                selectedRowData.materialNumber
+              }}件,理重为{{ selectedRowData.theoryWeight }}t,净重为{{
+                selectedRowData.netWeight
+              }}t</span
+            >
+          </el-form-item>
+        </el-form>
+        <div style="color: #000000;font-size: 16px;font-weight: 700;">
+          新增实时库存数据:
+        </div>
+        <el-form label-position="left">
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.consigneeName
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="saleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区</span
+            >
+            <el-input
+              v-model="updateInsertForm.saleArea"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              updateInsertForm.inboundWarehouse
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.materialName }}-{{
+                selectedRowData.materialSpe
+              }}-{{ selectedRowData.materialModel }};</span
+            ><span style="color:red;font-size: 16px;font-weight: 500;"
+              >物资单重为{{ selectedRowData.singleWeight }}t</span
+            >
+          </el-form-item>
+          <el-form-item prop="materialNumber">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资件数</span
+            >
+            <el-input
+              v-model.number="updateInsertForm.materialNumber"
+              type="number"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="theoryWeight">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资理重</span
+            >
+            <el-input
+              v-model="updateInsertForm.theoryWeight"
+              disabled
+              style="width:250px"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <div style="display: flex;justify-content: center;align-items: center;">
+          <el-button
+            type="primary"
+            @click="makeSureMaterial"
+            style="margin-right: 20px;"
+            >保存</el-button
+          >
+          <el-button @click="updateInsertVisible = false">取消</el-button>
+        </div>
+      </el-dialog>
     </div>
   </div>
 </template>
 <script>
-import { getCookie, formatDate } from '@/utils/util.js'
-
+import {
+  getCookie,
+  formatDate,
+  accAdd,
+  accMul,
+  accSub,
+  accDiv
+} from '@/utils/util.js'
 export default {
   data() {
     const generateStartDate = _ => {
@@ -63,9 +203,11 @@ export default {
       return endTime.getTime()
     }
     return {
+      activeMenu: window.top.localStorage.getItem('activeMenu'),
       options: {
         requestUrl: '',
-        requestQuery: {}
+        requestQuery: {},
+        selectionType: 'radio'
       },
       selectOptions: [
         {
@@ -101,7 +243,31 @@ export default {
       endTime: generateEndDate(),
       apiId: '531',
       orgCode: null,
-      loginName: null
+      loginName: null,
+      selectedRowData: {},
+      updateInsertVisible: false,
+      updateInsertForm: {},
+      showSummaryList: ['materialNumber', 'netWeight', 'theoryWeight']
+    }
+  },
+  computed: {
+    materialNumber() {
+      return this.updateInsertForm.materialNumber
+    }
+  },
+  watch: {
+    materialNumber(val) {
+      this.updateInsertForm.theoryWeight = accMul(
+        val,
+        this.updateInsertForm.singleWeight
+      )
+      this.updateInsertForm.netWeight = accMul(
+        accDiv(
+          this.selectedRowData.netWeight,
+          this.selectedRowData.materialNumber
+        ),
+        val
+      )
     }
   },
   created() {
@@ -109,9 +275,41 @@ export default {
     this.getRequestUrl()
   },
   methods: {
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+    addEditTime() {
+      if (Object.keys(this.selectedRowData).length == 0) {
+        this.$message({
+          type: 'error',
+          message: '请选择实时库存数据'
+        })
+        return
+      }
+      this.updateInsertForm.consigneeName = this.selectedRowData.consigneeName
+      this.updateInsertForm.oldSaleArea = this.selectedRowData.saleArea
+      this.updateInsertForm.inboundWarehouse = this.selectedRowData.inboundWarehouse
+      this.updateInsertForm.consigneeId = this.selectedRowData.consigneeId
+      this.updateInsertForm.materialId = this.selectedRowData.materialId
+      this.updateInsertForm.materialName = this.selectedRowData.materialName
+      this.updateInsertForm.materialSpe = this.selectedRowData.materialSpe
+      this.updateInsertForm.materialModel = this.selectedRowData.materialModel
+      this.updateInsertForm.inventoryId = this.selectedRowData.inventoryId
+      this.updateInsertForm.singleWeight = this.selectedRowData.singleWeight
+      this.updateInsertForm.meter = this.selectedRowData.meter
+      this.updateInsertForm.inboundArea = '欧冶库'
+      this.updateInsertVisible = true
+    },
+    radioChange(row) {
+      this.selectedRowData = row
+    },
     getInfo() {
       this.orgCode = getCookie('orgCode')
-      if (this.orgCode == 'shouhuokehu') {
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
         this.apiId = 534
         this.loginName = getCookie('loginName')
       } else if (this.orgCode == 'ouyechangwaiku') {
@@ -134,12 +332,36 @@ export default {
       let queryMap = {}
       queryMap[this.screen] = this.con
       queryMap[this.screen1] = this.con1
-      queryMap['consigneeName'] = this.loginName
-      queryMap['inboundWarehouse'] = this.inboundWarehouse
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
     search() {
       this.getRequestUrl()
+    },
+    makeSureMaterial() {
+      this.updateInsertForm.saleArea = this.updateInsertForm.saleArea.replace(
+        ',',
+        ','
+      )
+      console.log(this.updateInsertForm, 'this.updateInsertForm')
+      this.$confirm('确定保存吗?', '提示', {
+        type: 'warning'
+      }).then(() => {
+        this.axios
+          .post('/api/v1/wms/updateInsertRealTime', this.updateInsertForm)
+          .then(res => {
+            if (res.data.status == 'succeed') {
+              this.$message({
+                type: 'success',
+                message: '保存成功'
+              })
+              this.updateInsertVisible = false
+              this.getRequestUrl()
+            }
+          })
+      })
     }
   }
 }
@@ -154,5 +376,9 @@ export default {
     margin-left: 10px;
     margin-top: 10px;
   }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
 }
 </style>

+ 109 - 5
src/views/OYE/components/oYeTransPlan.vue

@@ -57,6 +57,12 @@
         <el-form-item
           ><el-button type="primary" @click="search">查询</el-button>
           <el-button type="primary" @click="insert">新增</el-button>
+          <el-button
+            type="primary"
+            @click="approve"
+            v-privilege="activeMenu + 'submit'"
+            >提交</el-button
+          >
           <el-button
             type="primary"
             @click="approve"
@@ -64,6 +70,18 @@
             >审核</el-button
           >
           <el-button type="danger" @click="deleteOrder">删除</el-button>
+          <el-button type="primary">
+            <el-upload
+              class="upload-excel"
+              action=""
+              :on-change="importExcel"
+              :show-file-list="false"
+              accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+              :auto-upload="false"
+            >
+              导入Excel</el-upload
+            >
+          </el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -148,11 +166,21 @@
               </el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="是否自提">
+            <el-select v-model="planForm.isSelfMention" style="width:auto">
+              <el-option label="是" value="是" :key="1"> </el-option>
+              <el-option label="否" value="否" :key="0"> </el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <el-button
               type="primary"
               @click="checkRealTimeInventory"
-              :disabled="planForm.receiveId == null ? true : false"
+              :disabled="
+                planForm.receiveId == null || planForm.saleRemark == null
+                  ? true
+                  : false
+              "
               >浏览实时库存</el-button
             >
           </el-form-item>
@@ -535,7 +563,9 @@
 </template>
 <script>
 import { getCookie, formatDate } from '@/utils/util.js'
+import exportTranPlan from './exportTranPlan.js'
 export default {
+  extends: exportTranPlan,
   data() {
     const generateStartDate = _ => {
       let startDate = new Date()
@@ -611,7 +641,8 @@ export default {
       planForm: {
         shipperName: '四川省达州钢铁集团有限责任公司',
         shipperId: 1,
-        filterFlag: 1
+        filterFlag: 1,
+        receiveId: null
       },
       title: '新增转运计划',
       materialList1: [],
@@ -742,7 +773,9 @@ export default {
       approvingList: [],
       loginName: '',
       orgCode: '',
-      showSummaryList: ['materialNumber', 'materialWeight']
+      showSummaryList: ['materialNumber', 'materialWeight'],
+      userId: '',
+      userName: ''
     }
   },
   created() {
@@ -761,6 +794,7 @@ export default {
     receiveCompanyId(val) {
       console.log(val, 'vval')
       this.planForm.consigneeId = val
+      this.planForm.receiveCompanyId = val
       this.getOyeSaleArea({ consigneeId: val })
     },
     province(val) {
@@ -774,7 +808,7 @@ export default {
     },
     dialogVisible(val) {
       if (val) {
-        this.getOyeConsigneeId()
+        this.getOyeConsigneeId(this.planForm)
         this.getOyeSaleArea()
       } else {
         this.planForm.receiveId = ''
@@ -808,6 +842,8 @@ export default {
     getInfo() {
       this.loginName = getCookie('loginName')
       this.orgCode = getCookie('orgCode')
+      this.userId = getCookie('userId')
+      this.userName = JSON.parse(getCookie('userInfo')).userName
     },
     getRequestUrl() {
       this.approvingOptions.requestUrl =
@@ -818,6 +854,9 @@ export default {
       let queryOp = {}
       queryOp[this.screen] = [this.con]
       queryOp[this.screen1] = [this.con1]
+      if (this.orgCode == 'shouhuokehu') {
+        queryOp['consigneeName'] = this.userName
+      }
       this.approvingOptions.requestQuery = {
         orderStatus: 0,
         deleted: 0,
@@ -871,11 +910,18 @@ export default {
       this.title = '新增转运计划'
     },
     getOyeConsigneeId(data = {}) {
+      if (this.orgCode == 'shouhuokehu') {
+        data.consigneeName = this.userName
+      }
       this.axios.post('/api/v1/uc/getOyeConsigneeId', data).then(res => {
+        if (res.data.data.length == 1) {
+          this.planForm.receiveId = res.data.data[0].id
+        }
         this.consigneeInfo = res.data.data || []
       })
     },
     getOyeSaleArea(data = {}) {
+      console.log(data, 'data')
       this.axios.post('/api/v1/uc/getOyeSaleArea', data).then(res => {
         this.saleAreaInfo = res.data.data || []
       })
@@ -1005,6 +1051,10 @@ export default {
     singleDistribute() {
       console.log(this.materialList)
       let ml = this.materialList.length
+      if (this.planForm.shipperAddressId == null) {
+        this.$message.error('请先选择收货地址')
+        return
+      }
       if (ml == 0) {
         this.$message.warning('请至少填入一车物资')
         return
@@ -1039,6 +1089,10 @@ export default {
     },
     createACar() {
       let i = 0
+      if (this.planForm.shipperAddressId == null) {
+        this.$message.error('请先选择收货地址')
+        return
+      }
       this.materialList.forEach(e => {
         if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
           e.orderPlanWeight = null
@@ -1325,13 +1379,17 @@ export default {
     makeSureAddOrder() {
       console.log(this.planForm, 'pl')
       console.log(this.selectionList, 'se')
+      if (this.selectionList.length == 0) {
+        this.$message.warning('请至少添加一车数据!')
+        return
+      }
       let data = { ...this.planForm }
       data.salerId = data.saleMan
       data.mapList = this.selectionList
-      data.isSelfMention = '否'
       this.axios.post('/api/v1/ams/addTransPlan', data).then(res => {
         if (res.data.status == 'succeed') {
           this.$message.success('添加成功!')
+          this.selectionList = []
           this.getRequestUrl()
           this.dialogVisible = false
         } else {
@@ -1343,6 +1401,10 @@ export default {
       this.approvingList = [].concat(section)
     },
     approve() {
+      if (this.approvingList.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      }
       let arr = this.approvingList.map(item => {
         let map = {}
         map.orderStatus = 4
@@ -1364,6 +1426,7 @@ export default {
             .then(res => {
               if (res.data.status == 'succeed') {
                 this.$message.success('审核成功!')
+                this.approvingList = []
                 this.getRequestUrl()
               } else {
                 this.$message.error(res.data.msg)
@@ -1373,11 +1436,17 @@ export default {
       })
     },
     deleteOrder() {
+      if (this.approvingList.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      }
+      console.log(this.approvingList, 'arr')
       let arr = this.approvingList.map(item => {
         let map = {}
         map.orderStatus = this.activeName == 'first' ? 0 : 4
         map.saleOrderId = item.saleOrderId
         map.deleted = 1
+        map.saleMaterialId = item.saleMaterialId
         return map
       })
       this.$confirm('确认删除选中的转运计划', '提示', {
@@ -1392,6 +1461,41 @@ export default {
             .then(res => {
               if (res.data.status == 'succeed') {
                 this.$message.success('删除成功!')
+                this.approvingList = []
+                this.getRequestUrl()
+              } else {
+                this.$message.error(res.data.msg)
+              }
+            })
+        }
+      })
+    },
+    submit() {
+      if (this.approvingList.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      }
+      let arr = this.approvingList.map(item => {
+        let map = {}
+        map.orderStatus = 1
+        map.saleOrderId = item.saleOrderId
+        map.deleted = 0
+        map.orderPlanWeight = item.materialNumber
+        map.inventoryId = item.inventoryId
+        return map
+      })
+      this.$confirm('确认提交选中的转运计划', '提示', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定'
+      }).then(res => {
+        if (res == 'confirm') {
+          this.axios
+            .post('/api/v1/ams/approveTransPlan', {
+              mapList: arr
+            })
+            .then(res => {
+              if (res.data.status == 'succeed') {
+                this.$message.success('提交成功!')
                 this.getRequestUrl()
               } else {
                 this.$message.error(res.data.msg)

+ 34 - 12
src/views/OYE/components/oYeTransResult.vue

@@ -412,6 +412,18 @@
           v-if="!columnNoRoutList.includes('净重')"
         >
         </el-table-column>
+        <el-table-column
+          prop="saleRemark"
+          column-key="saleRemark"
+          key="saleRemark"
+          label="摘要"
+          width="180px"
+          show-overflow-tooltip
+          align="center"
+          v-if="!columnNoRoutList.includes('摘要')"
+          :render-header="renderHeader"
+        >
+        </el-table-column>
         <el-table-column
           prop="addressPlace"
           label="收货地址"
@@ -433,6 +445,26 @@
             }}</span>
           </template>
         </el-table-column>
+        <el-table-column
+          prop="queueStartTime"
+          column-key="queueStartTime"
+          key="queueStartTime"
+          label="排队开始时间"
+          width="130px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('排队开始时间')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="allowEnfactoryTime"
+          column-key="allowEnfactoryTime"
+          key="allowEnfactoryTime"
+          label="钢材科放行时间"
+          width="130px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('钢材科放行时间')"
+        >
+        </el-table-column>
         <el-table-column
           prop="consigneeTel"
           column-key="consigneeTel"
@@ -443,18 +475,7 @@
           v-if="!columnNoRoutList.includes('收货客户电话')"
         >
         </el-table-column>
-        <el-table-column
-          prop="saleRemark"
-          column-key="saleRemark"
-          key="saleRemark"
-          label="摘要"
-          width="180px"
-          show-overflow-tooltip
-          align="center"
-          v-if="!columnNoRoutList.includes('摘要')"
-          :render-header="renderHeader"
-        >
-        </el-table-column>
+
         <el-table-column
           prop="truckRemark"
           column-key="truckRemark"
@@ -2254,6 +2275,7 @@ export default {
         console.log(map.saleRemarkByasm, 'map.saleRemarkByasm ')
         map.userName = getCookie('loginName')
         map.isPoundSale = e.isPoundSale
+        map.inventoryId = e.inventoryId
         if (map.isPoundSale == 0) {
           //为0则为磅重销售,则将净重转为理重
           map.theoryWeight = e.inboundNetWeight

+ 304 - 0
src/views/OYE/components/sendReceiveReport.vue

@@ -0,0 +1,304 @@
+<template>
+  <div class="sendReceiveReport">
+    <div class="top">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="date"
+            placeholder="日期"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            placeholder="日期"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-button type="primary" @click="search">查询</el-button>
+        <el-button type="primary" @click="exportToExcel">导出</el-button>
+
+        <el-form-item></el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        border
+        highlight-current-row
+        max-height="680px"
+        :summary-method="getSummaries"
+        :show-summary="true"
+        :row-style="{ height: '30px' }"
+        :cell-style="returnClassName"
+      >
+        <el-table-column
+          v-for="item in tableTop"
+          :prop="item.prop"
+          :key="item.prop"
+          :label="item.label"
+          :column-key="item.prop"
+          :width="item.width"
+          show-overflow-tooltip
+          align="center"
+        >
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie, formatDate, accAdd } from '@/utils/util.js'
+export default {
+  data() {
+    const generateStartDate = _ => {
+      let startDate = new Date()
+      let startDateStr = formatDate(startDate, 'yyyy-MM-dd')
+      let startTimeStr = startDateStr + ' 00:00:00'
+      let startTime = new Date(startTimeStr)
+      return startTime.getTime()
+    }
+    const generateEndDate = _ => {
+      let endDate = new Date()
+      let endDateStr = formatDate(endDate, 'yyyy-MM-dd')
+      let endTimeStr = endDateStr + ' 23:59:59'
+      let endTime = new Date(endTimeStr)
+      return endTime.getTime()
+    }
+    return {
+      options: {
+        requestUrl: '',
+        requestQuery: {},
+        isPagination: false,
+        pageSize: 500,
+        pageNum: 1
+      },
+      selectOptions: [
+        {
+          value: 'companyName',
+          label: '客户'
+        },
+        {
+          value: 'saleArea',
+          label: '片区'
+        },
+        {
+          value: 'inboundWarehouse',
+          label: '具体仓库'
+        },
+        {
+          value: 'materialName',
+          label: '物资名称'
+        },
+        {
+          value: 'materialSpe',
+          label: '规格'
+        }
+      ],
+      con: '',
+      con1: '',
+      screen: '',
+      screen1: '',
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      loginName: null,
+      userName: null,
+      inboundWarehouse: null,
+      showSummaryList: [
+        'materialWeight',
+        'materialNumber',
+        'inboundMaterialNumber',
+        'inboundMaterialWeight',
+        'outboundMaterialNumber',
+        'outboundMaterialWeight',
+        'currentInboundMaterialNumber',
+        'currentInboundTheoryWeight',
+        'currentOutboundMaterialNumber',
+        'currentInboundTheoryWeight'
+      ],
+      tableData: [],
+      tableTop: [
+        { label: '客户', prop: 'companyName', width: '250px' },
+        { label: '片区', prop: 'saleArea', width: '250px' },
+        { label: '出库库房', prop: 'inboundWarehouse', width: '180px' },
+        { label: '物资名称', prop: 'materialName', width: '180px' },
+        { label: '规格', prop: 'materialSpe', width: '100px' },
+        { label: '型号', prop: 'materialModel', width: '100px' },
+        { label: '总入库件数', prop: 'inboundMaterialNumber', width: '100px' },
+        { label: '总入库重量', prop: 'inboundMaterialWeight', width: '100px' },
+        { label: '总出库件数', prop: 'outboundMaterialNumber', width: '100px' },
+        { label: '总出库重量', prop: 'outboundMaterialWeight', width: '100px' },
+        {
+          label: '当日入库数量',
+          prop: 'currentInboundMaterialNumber',
+          width: '100px'
+        },
+        {
+          label: '当日入库重量',
+          prop: 'currentInboundTheoryWeight',
+          width: '100px'
+        },
+        {
+          label: '当日出库数量',
+          prop: 'currentOutboundMaterialNumber',
+          width: '100px'
+        },
+        {
+          label: '当日出库重量',
+          prop: 'currentOutboundTheoryWeight',
+          width: '100px'
+        },
+        { label: '库存件数', prop: 'materialNumber', width: '100px' },
+        { label: '库存重量', prop: 'materialWeight', width: '100px' }
+      ]
+    }
+  },
+  created() {
+    this.getInfo()
+    this.getRequestUrl()
+  },
+  mounted() {},
+  methods: {
+    getInfo() {
+      this.orgCode = getCookie('orgCode')
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
+        this.loginName = getCookie('loginName')
+      } else if (this.orgCode == 'ouyechangwaiku') {
+        this.loginName = null
+        this.inboundWarehouse = getCookie('loginName')
+      } else {
+        this.loginName = null
+      }
+    },
+    getRequestUrl() {
+      let optionsQuery = {}
+      optionsQuery[this.screen] = this.con
+      optionsQuery[this.screen1] = this.con1
+      if (this.loginName != null) {
+        optionsQuery['companyName'] = this.loginName
+      }
+
+      optionsQuery['startTime'] = this.startTime
+      optionsQuery['endTime'] = this.endTime
+      this.axios
+        .post('/api/v1/wms/receiveSendReport', optionsQuery)
+        .then(res => {
+          this.tableData = res.data.data || []
+        })
+    },
+    search() {
+      this.getRequestUrl()
+    },
+    //表尾合计行
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        }
+        if (this.showSummaryList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return accAdd(prev, curr)
+              } else {
+                return prev
+              }
+            }, 0)
+            // sums[index] = sums[index]
+          } else {
+            sums[index] = 'N/A'
+          }
+        }
+        //遍历数组,找到符合条件的列
+      })
+
+      return sums
+    },
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important',
+        width: 'auto !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+    exportToExcel(tableTitle = '欧冶出入库台账') {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let data = []
+      this.tableData.forEach((item, index) => {
+        let temp = {}
+        this.tableTop.forEach(col => {
+          temp[col.label] = item[col.prop]
+        })
+        data.push(temp)
+      })
+      //将json数组转换成sheet
+      let table_sheet = XLSX.utils.json_to_sheet(data)
+      //为工作簿添加sheet
+      XLSX.utils.book_append_sheet(wb, table_sheet, '欧冶出入库台账')
+      //导出
+      XLSX.writeFile(wb, '欧冶出入库台账' + '.xlsx')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.sendReceiveReport {
+  .top {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-right: 10px;
+  }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
+}
+</style>

+ 8 - 0
src/views/OYE/router/index.js

@@ -17,6 +17,8 @@ const queueStart = () => import('@/views/OYE/components/queueStart.vue')
 const steelTransportReport = () =>
   import('@/views/OYE/components/steelTransportReport.vue')
 const yawnReport = () => import('@/views/OYE/components/yawnReport.vue')
+const sendReceiveReport = () =>
+  import('@/views/OYE/components/sendReceiveReport.vue')
 
 Vue.use(Router)
 const constantRouterMap = [
@@ -86,6 +88,12 @@ const constantRouterMap = [
         name: 'steelTransportReport',
         meta: { code: 'xtpzgl-jggl' },
         component: steelTransportReport
+      },
+      {
+        path: 'sendReceiveReport',
+        name: 'sendReceiveReport',
+        meta: { code: 'xtpzgl-jggl' },
+        component: sendReceiveReport
       }
     ]
   }

+ 30 - 9
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1889,7 +1889,7 @@
               <span>{{ steelMap.addressProvince }}</span>
               <span>{{ steelMap.addressDistrict }}</span>
               <span>{{ steelMap.addressTown }}</span>
-              <span>{{ steelMap.place }}</span>
+              <span style="color:red">{{ steelMap.place }}</span>
             </div>
           </div>
           <div class="steelMapClass3">
@@ -1988,14 +1988,14 @@
             ></el-table-column>
             <el-table-column prop="saleRemarkByasm" label="摘要" width="180px">
             </el-table-column>
-            <!-- <el-table-column label="入库净重">
+            <el-table-column label="入库净重">
               <template slot-scope="scope">
                 <el-input
                   v-model.number="scope.row.inboundNetWeight"
                   type="number"
                 ></el-input>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </div>
         <span
@@ -2708,15 +2708,23 @@ export default {
             map.remark = item.remark
             return map
           })
-          if (getCookie('orgCode') == 'chengyunshang') {
+          if (getCookie('orgCode') == 'ouyechangwaiku') {
             this.oYeWarehouseList = this.oYeWarehouseList.filter(item => {
               return item.remark == JSON.parse(getCookie('userInfo')).userName
             })
+            this.steelMap.inboundWarehouse = getCookie('loginName')
+            console.log()
           }
         })
     },
     confireInboundTo(item) {
-      console.log(item, 'item')
+      if (item.inboundWarehouse == null) {
+        this.$message({
+          type: 'error',
+          message: '请先选择入库仓库'
+        })
+        return
+      }
       let flag = 1
       let arr = item.mapList.map(e => {
         let map = {}
@@ -2727,8 +2735,10 @@ export default {
         map.inboundWarehouse = item.inboundWarehouse
         map.inboundArea = '欧冶库'
         map.orderId = item.orderId
+        map.place = e.place
+        map.placeId = e.placeId
         map.meter = e.steelMeters
-        map.netWeight = e.netWeight
+        map.netWeight = e.inboundNetWeight
         map.materialNumber = e.materialNumber
         map.theoryWeight = e.theoryWeight
         map.materialId = e.materialId
@@ -2795,6 +2805,14 @@ export default {
         this.$message.error('请点击需要执行更改操作的行!')
         return
       }
+      if (!this.steelMap.place.includes('欧冶')) {
+        this.$message({
+          type: 'error',
+          message: '收货地址必须是两个欧冶厂外库之一',
+          duration: 2000
+        })
+        return
+      }
       // 将中文逗号替换为英文逗号
       if (Object.keys(this.steelMap).length > 0) {
         this.axios
@@ -2804,6 +2822,9 @@ export default {
           )
           .then(res => {
             this.steelMap = res.data.data
+            if (getCookie('orgCode') == 'ouyechangwaiku') {
+              this.steelMap.inboundWarehouse = getCookie('loginName')
+            }
             if (
               this.steelMap.outGateTime != null ||
               this.steelMap.orderStatus == '已完成'
@@ -5521,9 +5542,9 @@ export default {
         obj.consigneeLoginName = consigneeLoginName
       }
       if (getCookie('orgCode') == 'ouyechangwaiku') {
-        inboundWarehouse = getCookie('loginName')
+        obj.inboundWarehouse = '欧冶'
       }
-      obj.inboundWarehouse = inboundWarehouse
+
       if (this.screen == '客户') {
         consigneeName = this.input
       } else if (this.screen == '承运商') {
@@ -5743,7 +5764,7 @@ export default {
         this.filterMap.consigneeLoginName = consigneeLoginName
       }
       if (getCookie('orgCode') == 'ouyechangwaiku') {
-        this.filterMap.inboundWarehouse = getCookie('loginName')
+        this.filterMap.inboundWarehouse = '欧冶'
       }
       if (this.screen == '客户') {
         consigneeName = this.input