|
@@ -123,6 +123,16 @@
|
|
|
<i class="el-icon-finished"></i>获取制单日期</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="isShowOperate">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="exceptionHandle()"
|
|
|
+ v-if="!notRoutList.includes('exceptionHandle')"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-open"></i>
|
|
|
+ 异常处理
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<label
|
|
|
class="el-form-item__label"
|
|
@@ -289,6 +299,14 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="truckRemark"
|
|
|
+ label="备注"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="capacityTel"
|
|
|
label="司机电话"
|
|
@@ -750,20 +768,20 @@
|
|
|
<template slot-scope="scope">
|
|
|
<button
|
|
|
type="primary"
|
|
|
- @click="scope.row.materialNum--"
|
|
|
+ @click="scope.row.materialNumber--"
|
|
|
style="height:40px"
|
|
|
v-if="!notRoutList.includes('materialNum')"
|
|
|
>
|
|
|
-
|
|
|
</button>
|
|
|
<input
|
|
|
- v-model="scope.row.materialNum"
|
|
|
+ v-model="scope.row.materialNumber"
|
|
|
style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
|
|
|
:disabled="notRoutList.includes('materialNum')"
|
|
|
/>
|
|
|
<button
|
|
|
type="primary"
|
|
|
- @click="scope.row.materialNum++"
|
|
|
+ @click="scope.row.materialNumber++"
|
|
|
style="height:40px"
|
|
|
v-if="!notRoutList.includes('materialNum')"
|
|
|
>
|
|
@@ -1152,6 +1170,214 @@
|
|
|
<el-button @click="batchCarrierVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="batchCarrierMakeSure">确 定</el-button>
|
|
|
</el-dialog>
|
|
|
+ <div class="dialog">
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="exceptionHandleVisible"
|
|
|
+ width="90%"
|
|
|
+ center
|
|
|
+ title="异常处理"
|
|
|
+ >
|
|
|
+ <div class="exceptionHandleClass">
|
|
|
+ <span>新增件数,修改规格,加拼数</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass">
|
|
|
+ <div class="steelMapClass1">
|
|
|
+ <div class="steelMapClass12">
|
|
|
+ <span>销售订单号:</span>
|
|
|
+ <span>{{ steelMap.saleOrderNo }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass12">
|
|
|
+ <span>订单状态:</span>
|
|
|
+ <span>{{ steelMap.saleOrderStatus }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass12">
|
|
|
+ <span>业务员:</span>
|
|
|
+ <span>{{ steelMap.saler }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass12">
|
|
|
+ <span>客户:</span>
|
|
|
+ <span>{{ steelMap.consigneeName }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass2">
|
|
|
+ <div class="steelMapClass22">
|
|
|
+ <span>收货地址:</span>
|
|
|
+ <span>{{ steelMap.addressPlace }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass3">
|
|
|
+ <div class="steelMapClass32">
|
|
|
+ <span>收货客户电话:</span>
|
|
|
+ <span>{{ steelMap.consigneeTel }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass33" v-if="steelMap.carrierName">
|
|
|
+ <span>承运商:</span>
|
|
|
+ <span>{{ steelMap.carrierName }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass33" v-if="steelMap.capacityNo">
|
|
|
+ <span>车牌号:</span>
|
|
|
+ <span>{{ steelMap.capacityNo }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass33" v-if="steelMap.capacityTel != null">
|
|
|
+ <span>司机电话:</span>
|
|
|
+ <span>{{ steelMap.capacityTel }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass4">
|
|
|
+ <div class="steelMapClass42" v-if="steelMap.orderNo != null">
|
|
|
+ <span>运输订单号:</span>
|
|
|
+ <span>{{ steelMap.orderNo }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="steelMapClass43">
|
|
|
+ <span>运单状态:</span>
|
|
|
+ <span>{{ steelMap.orderStatus }}</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="steelMapClass43"
|
|
|
+ v-if="steelMap.orderStatusTime != null"
|
|
|
+ >
|
|
|
+ <span>状态更新时间:</span>
|
|
|
+ <span>{{ steelMap.orderStatusTime }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="table1">
|
|
|
+ <el-table
|
|
|
+ :data="steelMap.mapList"
|
|
|
+ border
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="materialName"
|
|
|
+ label="物资名称"
|
|
|
+ align="center"
|
|
|
+ width="180px"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.materialName"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="materialSpecification"
|
|
|
+ label="物资规格"
|
|
|
+ align="center"
|
|
|
+ sortable
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.materialSpecification"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="materialModel"
|
|
|
+ label="物资型号"
|
|
|
+ align="center"
|
|
|
+ width="150"
|
|
|
+ sortable
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.materialModel"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="materialNumber"
|
|
|
+ label="物资件数"
|
|
|
+ align="center"
|
|
|
+ width="200px"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <button
|
|
|
+ type="primary"
|
|
|
+ @click="scope.row.materialNumber--"
|
|
|
+ style="height:40px"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ >
|
|
|
+ -
|
|
|
+ </button>
|
|
|
+ <input
|
|
|
+ v-model="scope.row.materialNumber"
|
|
|
+ style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ />
|
|
|
+ <button
|
|
|
+ type="primary"
|
|
|
+ @click="scope.row.materialNumber++"
|
|
|
+ style="height:40px"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ >
|
|
|
+ +
|
|
|
+ </button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="steelMeters" label="米数" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.steelMeters"
|
|
|
+ :disabled="scope.row.netWeight != null"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="grossWeight" label="毛重"> </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="grossWeightTime"
|
|
|
+ label="毛重时间"
|
|
|
+ width="130px"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="tareWeight" label="皮重"> </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="tareWeightTime"
|
|
|
+ label="皮重时间"
|
|
|
+ width="130px"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="netWeight" label="净重"> </el-table-column>
|
|
|
+ <el-table-column prop="loadTime" label="装货时间" width="130px">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="closeEntryId"
|
|
|
+ label="金蝶分录ID"
|
|
|
+ width="100px"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="
|
|
|
+ deleteRow(scope.$index, steelMap.mapList)
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-close"
|
|
|
+ size="big"
|
|
|
+ v-if="scope.row.netWeight == null"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="copyRowflu(scope.$index, scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="big"
|
|
|
+ >新增一拼</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="exceptionHandleClass">
|
|
|
+ <el-button @click="exceptionHandleVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="exceptionHandleMakeSure"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -1168,6 +1394,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ exceptionHandleVisible: false,
|
|
|
batchCarrierName: null,
|
|
|
batchCarrierVisible: false,
|
|
|
batchAddressProvince: '',
|
|
@@ -1273,7 +1500,9 @@ export default {
|
|
|
'系统建议运价',
|
|
|
'摘要',
|
|
|
'排队开始时间',
|
|
|
- '钢材科放行时间'
|
|
|
+ '钢材科放行时间',
|
|
|
+ '备注',
|
|
|
+ '订单变更时间'
|
|
|
],
|
|
|
//钢材多拼车辆线路ID
|
|
|
//索引从1-10为1-10拼路线ID
|
|
@@ -1414,7 +1643,8 @@ export default {
|
|
|
'closeEntry',
|
|
|
'capacityNo',
|
|
|
'batchCarrier',
|
|
|
- 'select'
|
|
|
+ 'select',
|
|
|
+ 'exceptionHandle'
|
|
|
]
|
|
|
}
|
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
@@ -1430,6 +1660,9 @@ export default {
|
|
|
this.cellLeave1 = this.debounce((row, column, cell) => {
|
|
|
this.cellLeave(row, column, cell)
|
|
|
}, 100)
|
|
|
+ this.exceptionHandleMakeSure = this.debounce(() => {
|
|
|
+ this.exceptionHandleMakeSure1()
|
|
|
+ }, 500)
|
|
|
this.getSteelReport()
|
|
|
},
|
|
|
watch: {
|
|
@@ -1496,6 +1729,142 @@ export default {
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
+ deleteRow(index, rows) {
|
|
|
+ if (rows.length > 1) {
|
|
|
+ rows.splice(index, 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ copyRowflu(index, row) {
|
|
|
+ console.log(index)
|
|
|
+ let copyRowflu = new Object()
|
|
|
+ Object.keys(row).forEach(key => {
|
|
|
+ copyRowflu[key] = row[key]
|
|
|
+ })
|
|
|
+ delete copyRowflu.materialId
|
|
|
+ delete copyRowflu.netWeight
|
|
|
+ delete copyRowflu.grossWeight
|
|
|
+ delete copyRowflu.grossWeightTime
|
|
|
+ delete copyRowflu.tareWeight
|
|
|
+ delete copyRowflu.tareWeightTime
|
|
|
+ delete copyRowflu.loadTime
|
|
|
+ delete copyRowflu.closeEntryId
|
|
|
+ this.steelMap.mapList.splice(index + 1, 0, copyRowflu)
|
|
|
+ },
|
|
|
+ exceptionHandleMakeSure1() {
|
|
|
+ console.log(this.steelMap)
|
|
|
+ this.$confirm(
|
|
|
+ `该操作会将${this.steelMap.capacityNo}下未出净重的分录关闭,并重新上传金蝶,确认操作?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ center: true
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ let saleDateOfReceipt = null
|
|
|
+ let loadTime1 = new Date(
|
|
|
+ new Date(new Date().toLocaleDateString()).getTime() +
|
|
|
+ (3600 * 1000 * 8 - 1)
|
|
|
+ ) // 当天8点前
|
|
|
+ let loadTime2 = new Date(
|
|
|
+ new Date(new Date().toLocaleDateString()).getTime() +
|
|
|
+ (3600 * 1000 * 32 - 1)
|
|
|
+ ) // 次天8点前
|
|
|
+ if (new Date().getTime() - loadTime1 > 0) {
|
|
|
+ saleDateOfReceipt = loadTime2
|
|
|
+ } else {
|
|
|
+ saleDateOfReceipt = loadTime1
|
|
|
+ }
|
|
|
+ let closeEntryList = []
|
|
|
+ let map = this.steelMap
|
|
|
+ map.mapList.forEach(e => {
|
|
|
+ let map = {}
|
|
|
+ e.saleDateOfReceipt = sjTime(saleDateOfReceipt)
|
|
|
+ map.saleMaterialId = e.saleMaterialId
|
|
|
+ map.closeEntryId = e.closeEntryId
|
|
|
+ map.number = e.saleOrderNo
|
|
|
+ closeEntryList.push(map)
|
|
|
+ })
|
|
|
+ let mapList = map.mapList.filter(e => {
|
|
|
+ if (typeof e.netWeight == 'undefined' || e.netWeight == null) {
|
|
|
+ return e
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (mapList.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '所有分录包含净重,退出!',
|
|
|
+ offset: '250',
|
|
|
+ duration: '2500'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ map.mapList = mapList
|
|
|
+ map.isUploadEas = 1
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/ams/addSteelSaleOrder', map, {
|
|
|
+ timeout: 3 * 60 * 1000
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/ams/closingEntries', closeEntryList, {
|
|
|
+ timeout: 3 * 60 * 1000
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.getSteelReport()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ offset: '250',
|
|
|
+ message: '生成订单成功,关闭分录成功',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ this.exceptionHandleVisible = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {})
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ offset: '250',
|
|
|
+ duration: '2500',
|
|
|
+ message: '新增失败'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '取消操作',
|
|
|
+ offset: '200',
|
|
|
+ duration: 2500
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ exceptionHandle() {
|
|
|
+ if (this.$refs.tableRef.selection.length == 1) {
|
|
|
+ console.log(this.$refs.tableRef.selection[0])
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
|
|
|
+ this.$refs.tableRef.selection[0].saleOrderMaterialId
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.steelMap = res.data.data
|
|
|
+ this.exceptionHandleVisible = true
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: '异常处理单次仅能勾选一辆车',
|
|
|
+ offset: '250',
|
|
|
+ duration: '2500',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
getMakeDate() {
|
|
|
if (this.$refs.tableRef.selection.length > 0) {
|
|
|
let easPrimaryList = []
|
|
@@ -1547,12 +1916,14 @@ export default {
|
|
|
this.$message.success('授权承运商成功')
|
|
|
this.batchCarrierList = []
|
|
|
this.batchCarrierVisible = false
|
|
|
+ this.batchCarrierName = null
|
|
|
this.getSteelReport()
|
|
|
loading.close()
|
|
|
} else {
|
|
|
this.$message.error('授权失败,请联系管理员')
|
|
|
this.batchCarrierList = []
|
|
|
this.batchCarrierVisible = false
|
|
|
+ this.batchCarrierName = null
|
|
|
this.getSteelReport()
|
|
|
loading.close()
|
|
|
}
|
|
@@ -2123,6 +2494,7 @@ export default {
|
|
|
this.tableRowIndex = row.group
|
|
|
this.isRowClick = 1
|
|
|
this.steelMap = row
|
|
|
+ this.$refs.tableRef.toggleRowSelection(row)
|
|
|
},
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
if (row.group == this.tableRowIndex && this.tableRowIndex !== '') {
|
|
@@ -3238,6 +3610,14 @@ export default {
|
|
|
}
|
|
|
|
|
|
.dialog {
|
|
|
+ .exceptionHandleClass {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 20px;
|
|
|
+ margin-top: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
.steelMapClass {
|
|
|
.steelMapClass1 {
|
|
|
display: flex;
|