修改问题

master
sunzehua 1 year ago
parent 11842f36df
commit aa2223977a

@ -377,3 +377,10 @@ export function DjyCustomerDetail(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,
copyPages: state => state.booking.copyPages,
saveNeedNumber: state => state.booking.saveNeedNumber,
saveNeedCar: state => state.booking.saveNeedCar,
lineList: state => state.booking.lineList,
bookingInitData: state => state.booking.bookingInitData,
sourceList: state => state.booking.sourceList,

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

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

@ -26,16 +26,15 @@
<button @click="openModel('cutOff')" :style="{ marginLeft: '4px' }">
<span class="iconfont icon-daibanshixiang"></span>截单
</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('paper')">
<span class="iconfont icon-zhizhishu" style="font-size:18px;"></span>下货纸
</button>
<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 @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>
</div>
<div class="btn-list more-view-2">
@ -52,14 +51,6 @@
<a-upload :file-list="fileList" :before-upload="beforeUpload" name="file" :customRequest="uploadFile">
<button @click="ShowOCR"><span class="iconfont icon-OCR"></span>OCR</button>
</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 class="btn-list single-view-1" :style="{ width: '110px' }">
<a-popconfirm title="确定删除当前订舱?" ok-text="" cancel-text="" @confirm="removeOrder" @cancel="cancelRemove">
@ -72,6 +63,12 @@
<div class="btn-list single-view-4">
<button @click="FnGoSendCar"><span class="iconfont icon-yunshu1"></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 v-if="scrollTop > 100" class="btn-list single-view-2">
<div>提单号:{{ details.mblno }}</div>
<div>委托单位:{{ details.customername }}</div>

@ -73,7 +73,7 @@
<p>
<span>ETD:</span><span>{{ handleTime(details.ygtETD) }}</span>
</p>
<p>
<p @click="handleOpenAtd" style="cursor: pointer;">
<span>ATD:</span><span>{{ handleTime(details.atd) }}</span>
</p>
</div>
@ -377,6 +377,28 @@
</a-form>
</a-spin>>
</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>
</template>
<script>
@ -391,7 +413,8 @@ import {
BookingOrderSaveGoodsStatus,
refreshSailingDate,
GetRuleOpinionLog,
SubmitRule0pinion
SubmitRule0pinion,
SaveDataInList
} from '@/api/modular/main/BookingLedger'
export default {
@ -432,6 +455,7 @@ export default {
remarkModelvisible: false,
bookingModelconfirm: false,
remarkVal: '',
atdFlag: false,
showKey: [],
btnLoading: false,
fileModelvisible: false,
@ -442,12 +466,14 @@ export default {
uploading: false,
realTimePercent: null,
bookingServiceItem: [],
atdLoading: false,
booGoodsStatusItem: [],
bookingAttachType: [],
attachName: '',
attachCode: '',
editRemarkVal: null,
GoodsStatusVisible: false,
atdTime: '',
GoodsStatusEditData: {},
StatusVisibleForm: this.$form.createForm(this),
roleData: {},
@ -521,6 +547,28 @@ export default {
handleCancel() {
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) {
this.type = type
if (type === 2) {

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

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

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

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

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

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

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

@ -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))

Loading…
Cancel
Save