|
@@ -87,15 +87,17 @@
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-if="isShowOperate">
|
|
<el-form-item v-if="isShowOperate">
|
|
- <el-button type="primary" @click="operation()"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" @click="operation()">
|
|
<i class="el-icon-edit"></i>更改
|
|
<i class="el-icon-edit"></i>更改
|
|
<span>
|
|
<span>
|
|
<!-- || orgCode!='chengyunshang' -->
|
|
<!-- || orgCode!='chengyunshang' -->
|
|
- <el-badge :value="taskAllNum" :max="99" :hidden="taskAllNum < 1 "></el-badge>
|
|
|
|
|
|
+ <el-badge
|
|
|
|
+ :value="taskAllNum"
|
|
|
|
+ :max="99"
|
|
|
|
+ :hidden="taskAllNum < 1"
|
|
|
|
+ ></el-badge>
|
|
</span>
|
|
</span>
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ </el-button>
|
|
<!-- <el-button type="primary" @click="batchoperation()"
|
|
<!-- <el-button type="primary" @click="batchoperation()"
|
|
><i class="el-icon-edit"></i>批量更改</el-button
|
|
><i class="el-icon-edit"></i>批量更改</el-button
|
|
> -->
|
|
> -->
|
|
@@ -120,7 +122,7 @@
|
|
<i class="el-icon-share"></i>批量授权</el-button
|
|
<i class="el-icon-share"></i>批量授权</el-button
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item v-if="isShowOperate">
|
|
|
|
|
|
+ <!-- <el-form-item v-if="isShowOperate">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@click="getMakeDate()"
|
|
@click="getMakeDate()"
|
|
@@ -128,7 +130,7 @@
|
|
>
|
|
>
|
|
<i class="el-icon-finished"></i>获取制单日期</el-button
|
|
<i class="el-icon-finished"></i>获取制单日期</el-button
|
|
>
|
|
>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-form-item> -->
|
|
<el-form-item v-if="isShowOperate">
|
|
<el-form-item v-if="isShowOperate">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@@ -139,6 +141,16 @@
|
|
异常处理
|
|
异常处理
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item v-if="isShowOperate">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="mergeSplit()"
|
|
|
|
+ v-if="!notRoutList.includes('mergeSplit')"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-pie-chart"></i>
|
|
|
|
+ 合并或拆分
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<label
|
|
<label
|
|
class="el-form-item__label"
|
|
class="el-form-item__label"
|
|
@@ -1379,6 +1391,19 @@
|
|
size="big"
|
|
size="big"
|
|
>新增一拼</el-button
|
|
>新增一拼</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-button
|
|
|
|
+ @click.native.prevent="
|
|
|
|
+ linkageDeleteTransportOrder(scope.row, steelMap)
|
|
|
|
+ "
|
|
|
|
+ type="text"
|
|
|
|
+ size="big"
|
|
|
|
+ v-if="
|
|
|
|
+ isShowOperate &&
|
|
|
|
+ scope.row.netWeight != null &&
|
|
|
|
+ scope.row.netWeight != ''
|
|
|
|
+ "
|
|
|
|
+ >删除计量实绩</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -1642,8 +1667,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.orgCode=getCookie('orgCode');
|
|
|
|
- this.userId=getCookie('userId');
|
|
|
|
|
|
+ this.orgCode = getCookie('orgCode')
|
|
|
|
+ this.userId = getCookie('userId')
|
|
if (this.orgCodeList.includes(getCookie('orgCode'))) {
|
|
if (this.orgCodeList.includes(getCookie('orgCode'))) {
|
|
this.isShowOperate = true
|
|
this.isShowOperate = true
|
|
}
|
|
}
|
|
@@ -1664,11 +1689,12 @@ export default {
|
|
'capacityNo',
|
|
'capacityNo',
|
|
'batchCarrier',
|
|
'batchCarrier',
|
|
'select',
|
|
'select',
|
|
- 'exceptionHandle'
|
|
|
|
|
|
+ 'exceptionHandle',
|
|
|
|
+ 'mergeSplit'
|
|
]
|
|
]
|
|
- this.noticeInterval=setInterval(() => {
|
|
|
|
- this.getinformation();
|
|
|
|
- }, 1000*10);
|
|
|
|
|
|
+ this.noticeInterval = setInterval(() => {
|
|
|
|
+ this.getinformation()
|
|
|
|
+ }, 1000 * 10)
|
|
}
|
|
}
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
this.updateCapacityDebounce = this.debounce(() => {
|
|
this.updateCapacityDebounce = this.debounce(() => {
|
|
@@ -1755,19 +1781,178 @@ export default {
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //删除计量实绩
|
|
|
|
+ linkageDeleteTransportOrder(row, steelMap) {
|
|
|
|
+ console.log(row, 'row')
|
|
|
|
+ console.log(steelMap, 'steelMap')
|
|
|
|
+ if (row.netWeight != null && row.netWeight != '') {
|
|
|
|
+ //如果净重不为空
|
|
|
|
+ let arr = []
|
|
|
|
+ let map = {
|
|
|
|
+ orderNumber: row.orderNo,
|
|
|
|
+ good: row.materialName,
|
|
|
|
+ goodspa: `${row.materialSpecification}(${row.materialModel})`,
|
|
|
|
+ resultCrossWeightTime: row.grossWeightTime
|
|
|
|
+ }
|
|
|
|
+ arr.push(map)
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/uc/linkageDeleteTransportOrder', arr)
|
|
|
|
+ .then(res => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '删除计量实绩成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ this.exceptionHandleVisible = false
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mergeSplit() {
|
|
|
|
+ //如果勾选了多条则执行合并操作,如果勾选了一条则执行拆分操作
|
|
|
|
+ if (this.$refs.tableRef.selection.length == 1) {
|
|
|
|
+ this.splitOrder()
|
|
|
|
+ } else if (this.$refs.tableRef.selection.length > 1) {
|
|
|
|
+ this.mergeOrder()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请勾选/点击需要操作的行',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2300'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ splitOrder() {
|
|
|
|
+ this.$confirm(
|
|
|
|
+ `勾选了${this.$refs.tableRef.selection.length}条运单将执行拆分操作`,
|
|
|
|
+ '提醒',
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ center: true
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then(() => {
|
|
|
|
+ let mapList = this.$refs.tableRef.selection.map(e => {
|
|
|
|
+ let map = {}
|
|
|
|
+ map.saleOrderMaterialId = e.saleOrderMaterialId
|
|
|
|
+ return map
|
|
|
|
+ })
|
|
|
|
+ let map = {
|
|
|
|
+ mapList: mapList
|
|
|
|
+ }
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/splitOrder', map)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '200') {
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '拆分成功',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '拆分失败',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '拆分失败',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ duration: '2500',
|
|
|
|
+ message: '操作取消',
|
|
|
|
+ offset: '250'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ mergeOrder() {
|
|
|
|
+ this.$confirm(
|
|
|
|
+ `勾选了${this.$refs.tableRef.selection.length}条运单将执行合并操作`,
|
|
|
|
+ '提醒',
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ center: true
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then(() => {
|
|
|
|
+ let mapList = this.$refs.tableRef.selection.map(e => {
|
|
|
|
+ let map = {}
|
|
|
|
+ map.saleOrderMaterialId = e.saleOrderMaterialId
|
|
|
|
+ map.orderId = e.orderId
|
|
|
|
+ map.saleOrderId = e.saleOrderId
|
|
|
|
+ return map
|
|
|
|
+ })
|
|
|
|
+ let map = {
|
|
|
|
+ mapList: mapList
|
|
|
|
+ }
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/mergeOrder', map)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '200') {
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '合并成功',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '合并失败',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: '合并失败',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ duration: '2500',
|
|
|
|
+ message: '操作取消',
|
|
|
|
+ offset: '250'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//获取通知数量
|
|
//获取通知数量
|
|
getinformation() {
|
|
getinformation() {
|
|
this.axios
|
|
this.axios
|
|
.post('/api/v1/ams/getNoticeAll', { userId: this.userId })
|
|
.post('/api/v1/ams/getNoticeAll', { userId: this.userId })
|
|
.then(res => {
|
|
.then(res => {
|
|
- let taskAllNum = 0;
|
|
|
|
- res.data.data.forEach((e)=>{
|
|
|
|
- if(e.insertusername=='销售审核' && e.status==0){
|
|
|
|
- taskAllNum++;
|
|
|
|
|
|
+ let taskAllNum = 0
|
|
|
|
+ res.data.data.forEach(e => {
|
|
|
|
+ if (e.insertusername == '销售审核' && e.status == 0) {
|
|
|
|
+ taskAllNum++
|
|
}
|
|
}
|
|
- });
|
|
|
|
- this.taskAllNum=taskAllNum;
|
|
|
|
- console.log("未接收数目:",this.taskAllNum);
|
|
|
|
|
|
+ })
|
|
|
|
+ this.taskAllNum = taskAllNum
|
|
|
|
+ console.log('未接收数目:', this.taskAllNum)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
readAll() {
|
|
readAll() {
|
|
@@ -1777,7 +1962,7 @@ export default {
|
|
insertUserName: '销售审核'
|
|
insertUserName: '销售审核'
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
- this.taskAllNum = 0
|
|
|
|
|
|
+ this.taskAllNum = 0
|
|
})
|
|
})
|
|
},
|
|
},
|
|
deleteRow(index, rows) {
|
|
deleteRow(index, rows) {
|
|
@@ -2636,8 +2821,8 @@ export default {
|
|
row = this.steelMap
|
|
row = this.steelMap
|
|
}
|
|
}
|
|
//所有销售审核通知标记为已读
|
|
//所有销售审核通知标记为已读
|
|
- if(this.taskAllNum>0){
|
|
|
|
- this.readAll();
|
|
|
|
|
|
+ if (this.taskAllNum > 0) {
|
|
|
|
+ this.readAll()
|
|
}
|
|
}
|
|
this.axios
|
|
this.axios
|
|
.post(
|
|
.post(
|
|
@@ -3528,6 +3713,7 @@ export default {
|
|
console.log(this.maxHeight, 'this.maxHeight')
|
|
console.log(this.maxHeight, 'this.maxHeight')
|
|
this.maxHeight = window.innerHeight - 130
|
|
this.maxHeight = window.innerHeight - 130
|
|
console.log(this.maxHeight, 'this.maxHeight')
|
|
console.log(this.maxHeight, 'this.maxHeight')
|
|
|
|
+ this.steelMap = {}
|
|
loading.close()
|
|
loading.close()
|
|
console.log(this.visibleList)
|
|
console.log(this.visibleList)
|
|
})
|
|
})
|
|
@@ -3617,6 +3803,7 @@ export default {
|
|
)
|
|
)
|
|
.then(res => {
|
|
.then(res => {
|
|
this.tableData = res.data.data
|
|
this.tableData = res.data.data
|
|
|
|
+ this.steelMap = {}
|
|
this.totalHeight += this.itemHeight
|
|
this.totalHeight += this.itemHeight
|
|
this.visibleList = []
|
|
this.visibleList = []
|
|
this.maxHeight = window.innerHeight - 130
|
|
this.maxHeight = window.innerHeight - 130
|