修改问题

master
sunzehua 1 year ago
parent 11842f36df
commit aa2223977a

@ -377,3 +377,10 @@ export function DjyCustomerDetail(parameter) {
params: parameter params: parameter
}) })
} }
export function SaveTruckByPage(parameter) {
return axios({
url: '/TaskManageTruck/SaveTruckByPage',
method: 'post',
data: parameter
})
}

@ -28,6 +28,7 @@ const getters = {
ctnallList: state => state.booking.ctnallList, ctnallList: state => state.booking.ctnallList,
copyPages: state => state.booking.copyPages, copyPages: state => state.booking.copyPages,
saveNeedNumber: state => state.booking.saveNeedNumber, saveNeedNumber: state => state.booking.saveNeedNumber,
saveNeedCar: state => state.booking.saveNeedCar,
lineList: state => state.booking.lineList, lineList: state => state.booking.lineList,
bookingInitData: state => state.booking.bookingInitData, bookingInitData: state => state.booking.bookingInitData,
sourceList: state => state.booking.sourceList, sourceList: state => state.booking.sourceList,

@ -28,6 +28,7 @@ const booking = {
lineList: [], lineList: [],
sourceList: [], sourceList: [],
countryList: [], countryList: [],
saveNeedCar: '',
bookingInitData: { bookingInitData: {
customernameInitList: [], customernameInitList: [],
forwarderInitList: [], forwarderInitList: [],
@ -107,6 +108,9 @@ const booking = {
}, },
SET_SAVENEEDNUMBER: (state, id) => { SET_SAVENEEDNUMBER: (state, id) => {
state.saveNeedNumber = id state.saveNeedNumber = id
},
SET_SAVENEEDCar: (state, id) => {
state.saveNeedCar = id
} }
}, },

@ -110,6 +110,7 @@
:details="bookingDetails" :details="bookingDetails"
:excuteRules="excuteRules" :excuteRules="excuteRules"
:excuteRulesType="excuteRulesType" :excuteRulesType="excuteRulesType"
@changeAtd="changeAtd"
@changeDetail="changeDetailFun" @changeDetail="changeDetailFun"
@handleComplete="handleComplete" @handleComplete="handleComplete"
@rules="getRules" @rules="getRules"
@ -1046,7 +1047,9 @@ export default {
return '' return ''
} }
}, },
changeAtd(time) {
this.bookingDetails.atd = time + ':00'
},
getDetail() { getDetail() {
if (this.inPageLoading) { if (this.inPageLoading) {
return false return false

@ -26,16 +26,15 @@
<button @click="openModel('cutOff')" :style="{ marginLeft: '4px' }"> <button @click="openModel('cutOff')" :style="{ marginLeft: '4px' }">
<span class="iconfont icon-daibanshixiang"></span>截单 <span class="iconfont icon-daibanshixiang"></span>截单
</button> </button>
<button :style="{ marginLeft: '14px' }"><span class="iconfont icon-xiugai"></span>更改及退舱</button>
<button @click="openModel('vgm')"><span class="iconfont icon-dingdan"></span>VGM</button> <button @click="openModel('vgm')"><span class="iconfont icon-dingdan"></span>VGM</button>
<button @click="openModel('paper')">
<span class="iconfont icon-zhizhishu" style="font-size:18px;"></span>下货纸
</button>
<button @click="openModel('trace')"> <button @click="openModel('trace')">
<span class="iconfont icon-yunshu1" style="font-size:18px;"></span>运踪订阅 <span class="iconfont icon-yunshu1" style="font-size:18px;"></span>运踪
</button> </button>
<button @click="openPreOrderFun"> <button @click="openPreOrderFun">
<span class="iconfont icon-yunshu1" style="font-size:18px;"></span>预配舱单 <span class="iconfont icon-yunshu1" style="font-size:18px;"></span>舱单
</button>
<button @click="openModel('paper')">
<span class="iconfont icon-zhizhishu" style="font-size:18px;"></span>下货纸
</button> </button>
</div> </div>
<div class="btn-list more-view-2"> <div class="btn-list more-view-2">
@ -52,14 +51,6 @@
<a-upload :file-list="fileList" :before-upload="beforeUpload" name="file" :customRequest="uploadFile"> <a-upload :file-list="fileList" :before-upload="beforeUpload" name="file" :customRequest="uploadFile">
<button @click="ShowOCR"><span class="iconfont icon-OCR"></span>OCR</button> <button @click="ShowOCR"><span class="iconfont icon-OCR"></span>OCR</button>
</a-upload> </a-upload>
<button @click="checkFun"><span class="iconfont icon-jinggao"></span>校验</button>
</div>
<div class="btn-list single-view-1" :class="{ inLoad: inChildLoading || !changeFlag }">
<button @click="changePage('prev')"><span class="iconfont icon-shang"></span>上一票</button>
<button @click="changePage('next')">
<span class="iconfont icon-xia" :style="{ fontSize: '17px' }"></span>下一票
</button>
</div> </div>
<div class="btn-list single-view-1" :style="{ width: '110px' }"> <div class="btn-list single-view-1" :style="{ width: '110px' }">
<a-popconfirm title="确定删除当前订舱?" ok-text="" cancel-text="" @confirm="removeOrder" @cancel="cancelRemove"> <a-popconfirm title="确定删除当前订舱?" ok-text="" cancel-text="" @confirm="removeOrder" @cancel="cancelRemove">
@ -72,6 +63,12 @@
<div class="btn-list single-view-4"> <div class="btn-list single-view-4">
<button @click="FnGoSendCar"><span class="iconfont icon-yunshu1"></span>派车</button> <button @click="FnGoSendCar"><span class="iconfont icon-yunshu1"></span>派车</button>
</div> </div>
<div class="btn-list single-view-1" :class="{ inLoad: inChildLoading || !changeFlag }">
<button @click="changePage('prev')"><span class="iconfont icon-shang"></span>上一票</button>
<button @click="changePage('next')">
<span class="iconfont icon-xia" :style="{ fontSize: '17px' }"></span>下一票
</button>
</div>
<div v-if="scrollTop > 100" class="btn-list single-view-2"> <div v-if="scrollTop > 100" class="btn-list single-view-2">
<div>提单号:{{ details.mblno }}</div> <div>提单号:{{ details.mblno }}</div>
<div>委托单位:{{ details.customername }}</div> <div>委托单位:{{ details.customername }}</div>

@ -73,7 +73,7 @@
<p> <p>
<span>ETD:</span><span>{{ handleTime(details.ygtETD) }}</span> <span>ETD:</span><span>{{ handleTime(details.ygtETD) }}</span>
</p> </p>
<p> <p @click="handleOpenAtd" style="cursor: pointer;">
<span>ATD:</span><span>{{ handleTime(details.atd) }}</span> <span>ATD:</span><span>{{ handleTime(details.atd) }}</span>
</p> </p>
</div> </div>
@ -377,6 +377,28 @@
</a-form> </a-form>
</a-spin>> </a-spin>>
</a-modal> </a-modal>
<a-modal
title="实际开船日期"
:width="600"
:visible="atdFlag"
:maskClosable="false"
@cancel="atdFlag=false">
<a-spin :spinning="atdLoading">
<div>
<a-date-picker valueFormat="YYYY-MM-DD HH:mm" show-time v-model="atdTime" />
</div>
</a-spin>
<template slot="footer">
<a-popconfirm
title="确定修改吗"
ok-text="确定"
cancel-text="取消"
@confirm="handleSubimtAtd"
>
<a-button type="primary" >确定</a-button>
</a-popconfirm>
</template>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
@ -391,7 +413,8 @@ import {
BookingOrderSaveGoodsStatus, BookingOrderSaveGoodsStatus,
refreshSailingDate, refreshSailingDate,
GetRuleOpinionLog, GetRuleOpinionLog,
SubmitRule0pinion SubmitRule0pinion,
SaveDataInList
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
export default { export default {
@ -432,6 +455,7 @@ export default {
remarkModelvisible: false, remarkModelvisible: false,
bookingModelconfirm: false, bookingModelconfirm: false,
remarkVal: '', remarkVal: '',
atdFlag: false,
showKey: [], showKey: [],
btnLoading: false, btnLoading: false,
fileModelvisible: false, fileModelvisible: false,
@ -442,12 +466,14 @@ export default {
uploading: false, uploading: false,
realTimePercent: null, realTimePercent: null,
bookingServiceItem: [], bookingServiceItem: [],
atdLoading: false,
booGoodsStatusItem: [], booGoodsStatusItem: [],
bookingAttachType: [], bookingAttachType: [],
attachName: '', attachName: '',
attachCode: '', attachCode: '',
editRemarkVal: null, editRemarkVal: null,
GoodsStatusVisible: false, GoodsStatusVisible: false,
atdTime: '',
GoodsStatusEditData: {}, GoodsStatusEditData: {},
StatusVisibleForm: this.$form.createForm(this), StatusVisibleForm: this.$form.createForm(this),
roleData: {}, roleData: {},
@ -521,6 +547,28 @@ export default {
handleCancel() { handleCancel() {
this.roleFlag = false this.roleFlag = false
}, },
handleOpenAtd() {
this.atdFlag = true
this.atdTime = JSON.parse(JSON.stringify(this.details)).atd
},
handleSubimtAtd() {
const data = {
atd: this.atdTime,
Id: this.details.id
}
this.atdLoading = true
SaveDataInList(data).then(res => {
if (res.success) {
this.$message.success('修改成功')
this.$emit('changeAtd', this.atdTime)
this.$store.commit('SET_SAVENEEDNUMBER', this.details.id)
this.atdFlag = false
} else {
this.$message.error(res.message)
}
this.atdLoading = false
})
},
handleOpenRule(rule, type) { handleOpenRule(rule, type) {
this.type = type this.type = type
if (type === 2) { if (type === 2) {

@ -81,7 +81,7 @@
} }
} }
.more-view-1 { .more-view-1 {
width: 332px; width: 240px;
.iconfont { .iconfont {
color: #26b578; color: #26b578;
} }

@ -2028,7 +2028,6 @@ export default {
newBookingList = this.bookingList newBookingList = this.bookingList
} }
const _data = res.data.items.map((item, index) => { const _data = res.data.items.map((item, index) => {
this.$set(newBookingList, item.id, item)
item.index = (currentPage - 1) * pageSize + index item.index = (currentPage - 1) * pageSize + index
const bookstatus = [ const bookstatus = [
{ staCode: 'sta_cangdan', isChecked: false }, { staCode: 'sta_cangdan', isChecked: false },
@ -2086,11 +2085,11 @@ export default {
} }
}) })
item.hasGoods = hasGoods item.hasGoods = hasGoods
this.$set(newBookingList, item.id, item)
return item return item
}) })
this.$set(this.gridOptions.pagerConfig, 'columns', JSON.parse(JSON.stringify(initData.columns))) this.$set(this.gridOptions.pagerConfig, 'columns', JSON.parse(JSON.stringify(initData.columns)))
this.$set(this.gridOptions, 'data', [..._data]) this.$set(this.gridOptions, 'data', [..._data])
this.$refs.xGrid.reloadData(_data).then(() => { this.$refs.xGrid.reloadData(_data).then(() => {
this.$set(this.gridOptions, 'loading', false) this.$set(this.gridOptions, 'loading', false)
}) })

@ -95,7 +95,7 @@ export default {
this.data = record this.data = record
BookingOrderGetFieldName().then(res => { BookingOrderGetFieldName().then(res => {
let FieldNameList = [] const FieldNameList = []
Object.keys(res.data).forEach(item => { Object.keys(res.data).forEach(item => {
Object.keys(res.data[item]).forEach(item2 => { Object.keys(res.data[item]).forEach(item2 => {
@ -118,8 +118,8 @@ export default {
let UpperType = false let UpperType = false
let LowerType = false let LowerType = false
if (value) { if (value) {
let Upper = value.toUpperCase() const Upper = value.toUpperCase()
let Lower = value.toLowerCase() const Lower = value.toLowerCase()
this.FieldNameList2.forEach(item => { this.FieldNameList2.forEach(item => {
if (item.name.indexOf(value) > -1) { if (item.name.indexOf(value) > -1) {
@ -171,25 +171,34 @@ export default {
}) })
let Changetype = false let Changetype = false
let configJson = [] let configJson = []
const arr = []
this.data.forEach((item, index) => { this.data.forEach((item, index) => {
if (item.field == values.field) { if (item.field == values.field && item.Carrier == values.Carrier) {
this.data[index] = values this.data[index] = values
Changetype = true Changetype = true
} }
if (item.field == values.field && item.Carrier != values.Carrier) {
arr.push(1)
}
}) })
if (arr.length > 0) {
this.data.push(values)
Changetype = true
}
if (Changetype) { if (Changetype) {
configJson = [...this.data] configJson = [...this.data]
} else { } else {
configJson = [...this.data, values] configJson = [...this.data, values]
} }
let data = { type: 'booking_default_value', configJson: JSON.stringify(configJson) } const data = { type: 'booking_default_value', configJson: JSON.stringify(configJson) }
DjyTenantConfigSave(data) DjyTenantConfigSave(data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$message.success('新增成功') this.$message.success('新增成功')
this.confirmLoading = false this.confirmLoading = false
this.$emit('ok', values) this.$emit('ok', values)
this.handleCancel()
if (type == 'Close') { if (type == 'Close') {
this.handleCancel() this.handleCancel()
} else if (type == 'New') { } else if (type == 'New') {

@ -80,6 +80,7 @@ export default {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 20 } sm: { span: 20 }
}, },
rowIndex: 0,
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
@ -92,12 +93,12 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
// //
edit(record, loadData) { edit(record, loadData, rowIndex) {
console.log(record)
this.data = loadData this.data = loadData
this.visible = true this.visible = true
this.rowIndex = rowIndex
BookingOrderGetFieldName().then(res => { BookingOrderGetFieldName().then(res => {
let FieldNameList = [] const FieldNameList = []
Object.keys(res.data).forEach(item => { Object.keys(res.data).forEach(item => {
Object.keys(res.data[item]).forEach(item2 => { Object.keys(res.data[item]).forEach(item2 => {
FieldNameList.push({ FieldNameList.push({
@ -126,8 +127,8 @@ export default {
let UpperType = false let UpperType = false
let LowerType = false let LowerType = false
if (value) { if (value) {
let Upper = value.toUpperCase() const Upper = value.toUpperCase()
let Lower = value.toLowerCase() const Lower = value.toLowerCase()
this.FieldNameList2.forEach(item => { this.FieldNameList2.forEach(item => {
if (item.name.indexOf(value) > -1) { if (item.name.indexOf(value) > -1) {
@ -179,13 +180,14 @@ export default {
} }
}) })
let configJson = [] let configJson = []
this.data.forEach((item, index) => { // this.data.forEach((item, index) => {
if (item.field == values.field) { // if (item.field == values.field) {
this.data[index] = values // this.data[index] = values
} // }
}) // })
this.data[this.rowIndex] = values
configJson = [...this.data] configJson = [...this.data]
let data = { type: 'booking_default_value', configJson: JSON.stringify(configJson) } const data = { type: 'booking_default_value', configJson: JSON.stringify(configJson) }
DjyTenantConfigSave(data) DjyTenantConfigSave(data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {

@ -60,8 +60,8 @@
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center"> <vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }"> <template #default="{ row,rowIndex }">
<vxe-button type="text" @click="$refs.editForm.edit(row, loadData)"> <vxe-button type="text" @click="$refs.editForm.edit(row, loadData,rowIndex)">
<a-icon type="form" :style="{ color: '#13c2c2' }" /> <a-icon type="form" :style="{ color: '#13c2c2' }" />
</vxe-button> </vxe-button>
<a-popconfirm title="是否确认删除?" ok-text="" cancel-text="" @confirm="confirm(row)"> <a-popconfirm title="是否确认删除?" ok-text="" cancel-text="" @confirm="confirm(row)">
@ -156,11 +156,11 @@ export default {
} }
this.loading = false this.loading = false
if (this.queryParam.fieldName) { if (this.queryParam.fieldName) {
let Rdata = [] const Rdata = []
let UpperType = false let UpperType = false
let LowerType = false let LowerType = false
let Upper = this.queryParam.fieldName.toUpperCase() const Upper = this.queryParam.fieldName.toUpperCase()
let Lower = this.queryParam.fieldName.toLowerCase() const Lower = this.queryParam.fieldName.toLowerCase()
this.loadData.forEach(item => { this.loadData.forEach(item => {
if (item.fieldName.indexOf(this.queryParam.fieldName) > -1) { if (item.fieldName.indexOf(this.queryParam.fieldName) > -1) {
Rdata.push(item) Rdata.push(item)
@ -211,11 +211,17 @@ export default {
FnDel(e) { FnDel(e) {
this.loadData.forEach((item, index) => { this.loadData.forEach((item, index) => {
if (item.field == e.field) { if (item.field == e.field) {
this.loadData.splice(index, 1) if (e.Carrier) {
if (item.Carrier == e.Carrier) {
this.loadData.splice(index, 1)
}
} else {
this.loadData.splice(index, 1)
}
} }
}) })
let configJson = [...this.loadData] const configJson = [...this.loadData]
let data = { type: 'booking_default_value', configJson: JSON.stringify(configJson) } const data = { type: 'booking_default_value', configJson: JSON.stringify(configJson) }
DjyTenantConfigSave(data) DjyTenantConfigSave(data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {

@ -1524,6 +1524,7 @@ export default {
.then((res) => { .then((res) => {
if (res.data.succ) { if (res.data.succ) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.$store.commit('SET_SAVENEEDCar', this.taskPKId ? this.taskPKId : null)
// if (this.type == 'Add' && !this.BookingId) { // if (this.type == 'Add' && !this.BookingId) {
// this.type = 'Edit' // this.type = 'Edit'
// this.id = res.data.ext // this.id = res.data.ext

@ -116,7 +116,13 @@
</div> </div>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col class="right-content" :xs="24" :sm="24" :md="24" :lg="14" :xl="14"> <a-col
class="right-content"
:xs="24"
:sm="24"
:md="24"
:lg="14"
:xl="14">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item <a-form-model-item
@ -303,8 +309,9 @@
prop="kGs" prop="kGs"
> >
<div class="line-box"> <div class="line-box">
<a-input disabled :allowClear="true" v-model="taskDetail.kGs" /><span class="unit" <a-input disabled :allowClear="true" v-model="taskDetail.kGs" /><span
>KGS</span class="unit"
>KGS</span
> >
</div> </div>
</a-form-model-item> </a-form-model-item>
@ -319,8 +326,9 @@
prop="cbm" prop="cbm"
> >
<div class="line-box"> <div class="line-box">
<a-input disabled :allowClear="true" v-model="taskDetail.cbm" /><span class="unit" <a-input disabled :allowClear="true" v-model="taskDetail.cbm" /><span
>CBM</span class="unit"
>CBM</span
> >
</div> </div>
</a-form-model-item> </a-form-model-item>
@ -681,7 +689,13 @@
</div> </div>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col class="right-content" :xs="24" :sm="24" :md="24" :lg="14" :xl="14"> <a-col
class="right-content"
:xs="24"
:sm="24"
:md="24"
:lg="14"
:xl="14">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item <a-form-model-item
@ -1001,8 +1015,9 @@
</div> </div>
</div> </div>
<div class="line-box"> <div class="line-box">
<a-input disabled :allowClear="true" v-model="taskSiDetail.kGs" /><span class="unit" <a-input disabled :allowClear="true" v-model="taskSiDetail.kGs" /><span
>KGS</span class="unit"
>KGS</span
> >
</div> </div>
</a-form-model-item> </a-form-model-item>
@ -1029,8 +1044,9 @@
</div> </div>
</div> </div>
<div class="line-box"> <div class="line-box">
<a-input disabled :allowClear="true" v-model="taskSiDetail.cbm" /><span class="unit" <a-input disabled :allowClear="true" v-model="taskSiDetail.cbm" /><span
>CBM</span class="unit"
>CBM</span
> >
</div> </div>
</a-form-model-item> </a-form-model-item>
@ -1999,7 +2015,7 @@ export default {
var o2keys = Object.keys(object2) var o2keys = Object.keys(object2)
if (o2keys.length !== o1keys.length) return false if (o2keys.length !== o1keys.length) return false
for (let i = 0; i <= o1keys.length - 1; i++) { for (let i = 0; i <= o1keys.length - 1; i++) {
let key = o1keys[i] const key = o1keys[i]
if (!o2keys.includes(key)) return false if (!o2keys.includes(key)) return false
if (object2[key] !== object1[key]) return false if (object2[key] !== object1[key]) return false
} }
@ -2023,7 +2039,7 @@ export default {
}, },
reloadboxFun(type, index) { reloadboxFun(type, index) {
console.log(index) console.log(index)
let data = this.taskDetail[type] const data = this.taskDetail[type]
data[index] = this.taskSiDetail[type][index] data[index] = this.taskSiDetail[type][index]
data.map((item, index) => { data.map((item, index) => {
item.seq = index item.seq = index

@ -204,6 +204,10 @@
<template #status="{ row }"> <template #status="{ row }">
<span>{{ selectStatus(row.status) }}</span> <span>{{ selectStatus(row.status) }}</span>
</template> </template>
<template #truckName="{ row }">
<a-icon @click="handleOpen(row)" style="cursor: pointer;" type="edit" />
{{ row.truckName }}
</template>
<template #taskType="{ row }"> <template #taskType="{ row }">
<span>{{ filterType(row.taskType) }}</span> <span>{{ filterType(row.taskType) }}</span>
</template> </template>
@ -214,38 +218,6 @@
<span class="task-tit" @click="changePage(row)">{{ row.taskTitle }}</span> <span class="task-tit" @click="changePage(row)">{{ row.taskTitle }}</span>
</template> </template>
<template #operate="{ row }"> <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> <vxe-button class="operate-btn" type="text" icon="vxe-icon-edit" @click="changePage(row)"></vxe-button>
<template> <template>
<a-popconfirm <a-popconfirm
@ -345,15 +317,6 @@
</div> </div>
</a-spin> </a-spin>
</a-modal> </a-modal>
<!-- <a-alert
v-if="showdownLoadErr"
class="downLoad-err-alert"
message="下载失败"
:description="downLoadErrTip"
type="error"
closable
@close="onDownloadErrClose"
/> -->
<setFormModel <setFormModel
ref="setForm" ref="setForm"
:formData="formData" :formData="formData"
@ -383,6 +346,27 @@
</div> </div>
<div v-else>{{ bcFile.msg }}</div> <div v-else>{{ bcFile.msg }}</div>
</a-modal> </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> </div>
</template> </template>
<script> <script>
@ -409,10 +393,13 @@ import {
TaskManageTruckPrintTemplateWithHistoryList, TaskManageTruckPrintTemplateWithHistoryList,
TaskManageTruckPrint, TaskManageTruckPrint,
TaskManageTruckSendDispatchBatchByTask, TaskManageTruckSendDispatchBatchByTask,
TaskManageTruckCancelDispatchBatchByTask TaskManageTruckCancelDispatchBatchByTask,
DjyCustomerQuerytDjyCustomerInfo,
SaveTruckByPage
} from '@/api/modular/main/SendCar' } from '@/api/modular/main/SendCar'
import { DjyUserConfigMulti } from '@/api/modular/main/BookingLedger' import { DjyUserConfigMulti } from '@/api/modular/main/BookingLedger'
import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig' import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig'
import { mapGetters } from 'vuex'
const formInitData = [] const formInitData = []
export default { export default {
name: 'TaskmanageList', name: 'TaskmanageList',
@ -421,6 +408,9 @@ export default {
setFormModel, setFormModel,
formLabel formLabel
}, },
computed: {
...mapGetters(['saveNeedCar'])
},
watch: { watch: {
PrintType(newdata, oldData) { PrintType(newdata, oldData) {
const printType = newdata == 4 ? 20 : 10 const printType = newdata == 4 ? 20 : 10
@ -428,6 +418,34 @@ export default {
if (printType != print) { if (printType != print) {
this.GetPrintData('truckBill', printType) 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() { data() {
@ -438,6 +456,10 @@ export default {
bcFile: {}, bcFile: {},
PrintType: '1', PrintType: '1',
spinning: false, spinning: false,
carLoading: false,
selectCar: '',
selectCarName: '',
selectCarCode: '',
PrintModalVisible: false, PrintModalVisible: false,
levelTop: [], levelTop: [],
formData: formInitData, formData: formInitData,
@ -493,6 +515,7 @@ export default {
statusList: [], statusList: [],
taskTypeList: [], taskTypeList: [],
sourceList: [], sourceList: [],
carFlag: false,
taskCategoryList: [], taskCategoryList: [],
taskType: '', taskType: '',
// ==== ==== // ==== ====
@ -535,7 +558,9 @@ export default {
align: 'center' align: 'center'
} }
], ],
paperCalcExtras: '' editRow: {},
paperCalcExtras: '',
truckIdData: []
// downLoadErrTip: '', // downLoadErrTip: '',
// showdownLoadErr: false // showdownLoadErr: false
} }
@ -551,6 +576,7 @@ export default {
this.getParaInfo('taskSource', 'SOURCE') this.getParaInfo('taskSource', 'SOURCE')
this.getParaInfo('taskCategory', 'CATEGORY') this.getParaInfo('taskCategory', 'CATEGORY')
this.getConfigUser(true) this.getConfigUser(true)
this.gettruckIdData()
}, },
methods: { methods: {
handleCopy() { handleCopy() {
@ -563,8 +589,46 @@ export default {
document.execCommand('copy'); document.execCommand('copy');
document.body.removeChild(cInput); 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 }) { getCompleteListFun({ form, value }) {
console.log(value)
let query = {} let query = {}
if (['taskType', 'taskSource', 'taskCategory', 'status'].includes(form.label)) { if (['taskType', 'taskSource', 'taskCategory', 'status'].includes(form.label)) {
query = { query = {
@ -625,6 +689,10 @@ export default {
}) })
}) })
}, },
handleOpen(row) {
this.carFlag = true
this.editRow = row
},
formChange(data) { formChange(data) {
console.log(data) console.log(data)
const { form, value } = data const { form, value } = data
@ -781,6 +849,10 @@ export default {
if (item.field === 'operate') { if (item.field === 'operate') {
item.width = 110 item.width = 110
} }
if (item.field === 'truckName') {
item.slots = { default: 'truckName' }
item.width = 150
}
return item.field return item.field
}) })
this.gridOptions.columns = JSON.parse(JSON.stringify(this.formTableData)) this.gridOptions.columns = JSON.parse(JSON.stringify(this.formTableData))

Loading…
Cancel
Save