|
|
|
@ -204,6 +204,10 @@
|
|
|
|
|
<template #status="{ row }">
|
|
|
|
|
<span>{{ selectStatus(row.status) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #truckName="{ row }">
|
|
|
|
|
<a-icon @click="handleOpen(row)" style="cursor: pointer;" type="edit" />
|
|
|
|
|
{{ row.truckName }}
|
|
|
|
|
</template>
|
|
|
|
|
<template #taskType="{ row }">
|
|
|
|
|
<span>{{ filterType(row.taskType) }}</span>
|
|
|
|
|
</template>
|
|
|
|
@ -214,38 +218,6 @@
|
|
|
|
|
<span class="task-tit" @click="changePage(row)">{{ row.taskTitle }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #operate="{ row }">
|
|
|
|
|
<!-- <a-button type="text" size="small" icon="vxe-icon-edit"></a-button> -->
|
|
|
|
|
<!-- <template v-if="row.taskType === 'ORIGINAL_DOWN'">
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="确定下载?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="taskDownloadFun(row)"
|
|
|
|
|
@cancel="cancelFun"
|
|
|
|
|
>
|
|
|
|
|
<a-tooltip>
|
|
|
|
|
<template slot="title">
|
|
|
|
|
预览附件
|
|
|
|
|
</template>
|
|
|
|
|
<span class="operate-btn iconfont icon-a-wendangcaozuoxiazaishangchuanshanchuxinzengfujianyasuochakan-01"></span>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<a-tooltip>
|
|
|
|
|
<template slot="title">
|
|
|
|
|
LARA登记
|
|
|
|
|
</template>
|
|
|
|
|
<span
|
|
|
|
|
class="operate-btn iconfont icon-electronic-signature"
|
|
|
|
|
@click="laraPaperRegistFun(row)"
|
|
|
|
|
></span>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
<a-tooltip>
|
|
|
|
|
<template slot="title">
|
|
|
|
|
LARA记录
|
|
|
|
|
</template>
|
|
|
|
|
<span class="operate-btn iconfont icon-touzijilu" @click="laraRecordFun(row)"></span>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
</template> -->
|
|
|
|
|
<vxe-button class="operate-btn" type="text" icon="vxe-icon-edit" @click="changePage(row)"></vxe-button>
|
|
|
|
|
<template>
|
|
|
|
|
<a-popconfirm
|
|
|
|
@ -345,15 +317,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- <a-alert
|
|
|
|
|
v-if="showdownLoadErr"
|
|
|
|
|
class="downLoad-err-alert"
|
|
|
|
|
message="下载失败"
|
|
|
|
|
:description="downLoadErrTip"
|
|
|
|
|
type="error"
|
|
|
|
|
closable
|
|
|
|
|
@close="onDownloadErrClose"
|
|
|
|
|
/> -->
|
|
|
|
|
<setFormModel
|
|
|
|
|
ref="setForm"
|
|
|
|
|
:formData="formData"
|
|
|
|
@ -383,6 +346,27 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>{{ bcFile.msg }}</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal title="选择车队" width="800px" @ok="handleChangeCar" :visible="carFlag" @cancel="carFlag = false">
|
|
|
|
|
<a-spin :spinning="carLoading">
|
|
|
|
|
<a-select
|
|
|
|
|
:showSearch="true"
|
|
|
|
|
:filterOption="filterOption"
|
|
|
|
|
v-model="selectCar"
|
|
|
|
|
@change="Changeyardid"
|
|
|
|
|
allowClear
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
style="width:450px"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
show-search
|
|
|
|
|
@search="gettruckIdData">
|
|
|
|
|
<a-select-option v-for="item in truckIdData" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.shortName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select></a-spin>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
@ -409,10 +393,13 @@ import {
|
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
|
TaskManageTruckSendDispatchBatchByTask,
|
|
|
|
|
TaskManageTruckCancelDispatchBatchByTask
|
|
|
|
|
TaskManageTruckCancelDispatchBatchByTask,
|
|
|
|
|
DjyCustomerQuerytDjyCustomerInfo,
|
|
|
|
|
SaveTruckByPage
|
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
|
import { DjyUserConfigMulti } from '@/api/modular/main/BookingLedger'
|
|
|
|
|
import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig'
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
const formInitData = []
|
|
|
|
|
export default {
|
|
|
|
|
name: 'TaskmanageList',
|
|
|
|
@ -421,6 +408,9 @@ export default {
|
|
|
|
|
setFormModel,
|
|
|
|
|
formLabel
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapGetters(['saveNeedCar'])
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
PrintType(newdata, oldData) {
|
|
|
|
|
const printType = newdata == 4 ? 20 : 10
|
|
|
|
@ -428,6 +418,34 @@ export default {
|
|
|
|
|
if (printType != print) {
|
|
|
|
|
this.GetPrintData('truckBill', printType)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'$route': {
|
|
|
|
|
deep: true,
|
|
|
|
|
handler(nD, oD) {
|
|
|
|
|
console.log(nD)
|
|
|
|
|
if (nD.name === 'Taskmanage_list') {
|
|
|
|
|
if (this.saveNeedCar !== null) {
|
|
|
|
|
let index = 0
|
|
|
|
|
this.gridOptions.data.forEach((ite, inde) => {
|
|
|
|
|
if (ite.id === this.saveNeedCar) {
|
|
|
|
|
index = inde
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
GetTaskManagePage({ pkId: this.saveNeedCar })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$set(this.gridOptions.data, index, res.data.items[0])
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
@ -438,6 +456,10 @@ export default {
|
|
|
|
|
bcFile: {},
|
|
|
|
|
PrintType: '1',
|
|
|
|
|
spinning: false,
|
|
|
|
|
carLoading: false,
|
|
|
|
|
selectCar: '',
|
|
|
|
|
selectCarName: '',
|
|
|
|
|
selectCarCode: '',
|
|
|
|
|
PrintModalVisible: false,
|
|
|
|
|
levelTop: [],
|
|
|
|
|
formData: formInitData,
|
|
|
|
@ -493,6 +515,7 @@ export default {
|
|
|
|
|
statusList: [],
|
|
|
|
|
taskTypeList: [],
|
|
|
|
|
sourceList: [],
|
|
|
|
|
carFlag: false,
|
|
|
|
|
taskCategoryList: [],
|
|
|
|
|
taskType: '',
|
|
|
|
|
// ==== 操作按钮 ====
|
|
|
|
@ -535,7 +558,9 @@ export default {
|
|
|
|
|
align: 'center'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
paperCalcExtras: ''
|
|
|
|
|
editRow: {},
|
|
|
|
|
paperCalcExtras: '',
|
|
|
|
|
truckIdData: []
|
|
|
|
|
// downLoadErrTip: '',
|
|
|
|
|
// showdownLoadErr: false
|
|
|
|
|
}
|
|
|
|
@ -551,6 +576,7 @@ export default {
|
|
|
|
|
this.getParaInfo('taskSource', 'SOURCE')
|
|
|
|
|
this.getParaInfo('taskCategory', 'CATEGORY')
|
|
|
|
|
this.getConfigUser(true)
|
|
|
|
|
this.gettruckIdData()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleCopy() {
|
|
|
|
@ -563,8 +589,46 @@ export default {
|
|
|
|
|
document.execCommand('copy');
|
|
|
|
|
document.body.removeChild(cInput);
|
|
|
|
|
},
|
|
|
|
|
Changeyardid(e) {
|
|
|
|
|
this.truckIdData.forEach(item => {
|
|
|
|
|
if (item.id === e) {
|
|
|
|
|
this.selectCarName = item.shortName
|
|
|
|
|
this.selectCarCode = item.codeName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleChangeCar() {
|
|
|
|
|
const data = {
|
|
|
|
|
taskPKId: this.editRow.pkId,
|
|
|
|
|
truckId: this.selectCar,
|
|
|
|
|
truckCode: this.selectCarCode,
|
|
|
|
|
truckName: this.selectCarName
|
|
|
|
|
}
|
|
|
|
|
this.carLoading = true
|
|
|
|
|
SaveTruckByPage(data).then(res => {
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
this.carFlag = false
|
|
|
|
|
this.$message.success('修改成功')
|
|
|
|
|
this.editRow.truckName = this.selectCarName
|
|
|
|
|
this.selectCar = ''
|
|
|
|
|
this.selectCarCode = ''
|
|
|
|
|
this.selectCarCode = ''
|
|
|
|
|
this.editRow = {}
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.data.msg)
|
|
|
|
|
}
|
|
|
|
|
this.carLoading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
filterOption(value, option) {
|
|
|
|
|
return option.componentOptions.children[0].text.indexOf(value) >= 0
|
|
|
|
|
},
|
|
|
|
|
gettruckIdData(name, type) {
|
|
|
|
|
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then((res) => {
|
|
|
|
|
this.truckIdData = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getCompleteListFun({ form, value }) {
|
|
|
|
|
console.log(value)
|
|
|
|
|
let query = {}
|
|
|
|
|
if (['taskType', 'taskSource', 'taskCategory', 'status'].includes(form.label)) {
|
|
|
|
|
query = {
|
|
|
|
@ -625,6 +689,10 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleOpen(row) {
|
|
|
|
|
this.carFlag = true
|
|
|
|
|
this.editRow = row
|
|
|
|
|
},
|
|
|
|
|
formChange(data) {
|
|
|
|
|
console.log(data)
|
|
|
|
|
const { form, value } = data
|
|
|
|
@ -781,6 +849,10 @@ export default {
|
|
|
|
|
if (item.field === 'operate') {
|
|
|
|
|
item.width = 110
|
|
|
|
|
}
|
|
|
|
|
if (item.field === 'truckName') {
|
|
|
|
|
item.slots = { default: 'truckName' }
|
|
|
|
|
item.width = 150
|
|
|
|
|
}
|
|
|
|
|
return item.field
|
|
|
|
|
})
|
|
|
|
|
this.gridOptions.columns = JSON.parse(JSON.stringify(this.formTableData))
|
|
|
|
|