修改问题

master
sunzehua 1 year ago
parent 032f12040a
commit b63203cc34

@ -570,7 +570,6 @@
<div class="marks"> <div class="marks">
<a-form-model-item <a-form-model-item
class="pre-from-label" class="pre-from-label"
label="唛头"
prop="marks" prop="marks"
:labelCol="{ :labelCol="{
xs: { span: 24 }, xs: { span: 24 },
@ -583,6 +582,13 @@
md: { span: 24 } md: { span: 24 }
}" }"
has-feedback> has-feedback>
<span slot="label">
唛头&nbsp;
<span
@click="handleOpen(1)"
style="cursor: pointer;"
class="copy-btn iconfont icon-bianji"></span>
</span>
<textareaView <textareaView
class="input-box" class="input-box"
id="pre-marks-scroll" id="pre-marks-scroll"
@ -596,7 +602,6 @@
<div class="description"> <div class="description">
<a-form-model-item <a-form-model-item
class="pre-from-label" class="pre-from-label"
label="货物描述"
prop="description" prop="description"
:labelCol="{ :labelCol="{
xs: { span: 24 }, xs: { span: 24 },
@ -609,6 +614,13 @@
md: { span: 24 } md: { span: 24 }
}" }"
has-feedback> has-feedback>
<span slot="label">
货物描述&nbsp;
<span
@click="handleOpen(2)"
style="cursor: pointer;"
class="copy-btn iconfont icon-bianji"></span>
</span>
<textareaView <textareaView
class="input-box" class="input-box"
id="pre-description-scroll" id="pre-description-scroll"
@ -918,6 +930,33 @@
<a-input :allowClear="true" v-model="modelName" /> <a-input :allowClear="true" v-model="modelName" />
</div> </div>
</a-modal> </a-modal>
<a-modal :title="modelTitle" :width="900" :visible="visible" @ok="visible = false" @cancel="visible = false">
<div>
<div v-if="modelType === 1" style="display: flex;">
<textareaView
class="input-box"
id="marks-scroll"
:parentVal="orderDetails.marks"
type="marks"
:height="500"
style="font-size:20px;margin-right: 10px;"
:openToCDB="true"
@getTextareaChange="getTextareaChange" />
</div>
<div v-if="modelType === 2" style="display: flex;">
<textareaView
id="description-scroll"
class="input-box"
:parentVal="orderDetails.description"
type="description"
:height="500"
style="font-size:20px;margin-right: 10px;"
:openToCDB="true"
@getTextareaChange="getTextareaChange" />
</div>
</div>
</a-modal>
</div> </div>
</a-modal> </a-modal>
</template> </template>
@ -1031,6 +1070,8 @@ export default {
data() { data() {
return { return {
shipperTemplate: '', shipperTemplate: '',
visible: false,
modelTitle: '',
consigneeTemplate: '', consigneeTemplate: '',
notifypartyTemplate: '', notifypartyTemplate: '',
modelType: '', modelType: '',
@ -1595,7 +1636,7 @@ export default {
this.modelName = '' this.modelName = ''
}, },
handleRef() { handleRef() {
if (this.editIndex === 0) { if (!this.orderList[this.editIndex].isHBL) {
const $details = JSON.parse(JSON.stringify(this.details)) const $details = JSON.parse(JSON.stringify(this.details))
const $data = { const $data = {
bookingId: $details.id, bookingId: $details.id,
@ -1692,7 +1733,7 @@ export default {
$data.notifypartyaddR1 = newArr[1] $data.notifypartyaddR1 = newArr[1]
} }
this.orderDetails = $data this.orderDetails = $data
this.orderList[0] = $data this.orderList[this.editIndex] = $data
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.$message.warning('只能刷新主提单') this.$message.warning('只能刷新主提单')
@ -1883,19 +1924,19 @@ export default {
yard: $details.yard, yard: $details.yard,
ediCtn: [] ediCtn: []
} }
if (isHBL || type === 'enter') { if (!isHBL || type === 'enter') {
// $details.ctnInputs.forEach((item) => { $details.ctnInputs.forEach((item) => {
// $data.ediCtn.push({ $data.ediCtn.push({
// ctnall: item.ctnall, ctnall: item.ctnall,
// cntrno: item.cntrno, cntrno: item.cntrno,
// sealno: item.sealno, sealno: item.sealno,
// pkgs: item.pkgs, pkgs: item.pkgs,
// kindpkgs: item.kindpkgs, kindpkgs: item.kindpkgs,
// kgs: item.kgs || 0, kgs: item.kgs || 0,
// cbm: item.cbm, cbm: item.cbm,
// rowKey: item.rowKey rowKey: item.rowKey
// }) })
// }) })
} }
if (isHBL && type != 'enter') { if (isHBL && type != 'enter') {
console.log('复制主单信息') console.log('复制主单信息')
@ -1982,12 +2023,17 @@ export default {
this.orderList.push($data) this.orderList.push($data)
}, },
removeOrder() { removeOrder() {
console.log(this.selectArr)
if (this.selectArr.length === 0) { if (this.selectArr.length === 0) {
this.$message.error('请选择删除单号') this.$message.error('请选择删除单号')
return false return false
} }
if (this.selectArr.includes(0)) { const arr = []
this.selectArr.forEach(item => {
if (!this.orderList[item].isHBL) {
arr.push(1)
}
})
if (arr.length > 0) {
this.$message.error('主单不允许删除') this.$message.error('主单不允许删除')
return false return false
} }
@ -2122,6 +2168,15 @@ export default {
console.log(err) console.log(err)
}) })
}, },
handleOpen(type) {
this.modelType = type
if (type === 1) {
this.modelTitle = '唛头'
} else {
this.modelTitle = '货物描述'
}
this.visible = true
},
inputChange({ type, value }) { inputChange({ type, value }) {
this.orderDetails[type] = value this.orderDetails[type] = value
this.$forceUpdate() this.$forceUpdate()

@ -1484,10 +1484,13 @@ export default {
if (item.label === 'LINENAME') { if (item.label === 'LINENAME') {
item.field = 'lineName' item.field = 'lineName'
} }
if (item.label === 'ETA') {
item.title = '目的港ETA'
}
}) })
const nowTableArr = this.formTableData.map((item, index) => { const nowTableArr = this.formTableData.map((item, index) => {
if (item.field === 'operate') { if (item.field === 'operate') {
item.width = 110 item.width = 60
} }
return item.field return item.field
}) })
@ -2744,6 +2747,8 @@ export default {
/*列表操作按钮颜色 */ /*列表操作按钮颜色 */
/deep/ .operate-btn { /deep/ .operate-btn {
color: @primary-color; color: @primary-color;
width: 19px;
margin: 0 !important;
} }
/deep/ .operate-btn:hover { /deep/ .operate-btn:hover {

@ -86,7 +86,7 @@
<a-select-option <a-select-option
v-for="(item, index) in dataSourceList" v-for="(item, index) in dataSourceList"
:key="`${index}-${item[labelData.showLabel]}`" :key="`${index}-${item[labelData.showLabel]}`"
:value="`${index}-${item[labelData.showLabel]}`" :value="`${index}-_-${item[labelData.showLabel]}`"
:label="item[labelData.showLabel]"> :label="item[labelData.showLabel]">
<div> <div>
<div class="title">{{ item[labelData.showLabel] }}</div> <div class="title">{{ item[labelData.showLabel] }}</div>
@ -391,23 +391,22 @@ export default {
} }
}, },
completeSelect(value) { completeSelect(value) {
const val = value.split('-')[1] const val = value.split('-_-')[1]
this.$emit('change', { this.$emit('change', {
form: this.labelData, form: this.labelData,
value: val || '' value: val || ''
}) })
}, },
completeChange(value) { completeChange(value) {
const val = value ? value.split('-')[1] : '' const val = value ? value.split('-_-')[1] : ''
const res = val || value || '' this.$emit('change', {
this.$emit('change', { form: this.labelData,
form: this.labelData, value: val || value || ''
value: val || value || '' })
}) this.$emit('getCompleteList', {
this.$emit('getCompleteList', { form: this.labelData,
form: this.labelData, value: value.includes('-_-') ? val || '' : value || ''
value: value.includes('-') ? val || '' : value || '' })
})
}, },
completeChangeFirst(value) { completeChangeFirst(value) {
if (this.value) { if (this.value) {

@ -63,7 +63,7 @@ export default {
{ {
field: 'operate', field: 'operate',
title: '操作', title: '操作',
width: 110, width: 50,
noDraggable: true, noDraggable: true,
slots: { default: 'operate' }, slots: { default: 'operate' },
fixed: 'right', fixed: 'right',
@ -223,7 +223,7 @@ export default {
sortable: true, sortable: true,
slots: { default: 'closingdate' } slots: { default: 'closingdate' }
}, },
{ field: 'eta', label: 'ETA', width: 160, title: '预计到港日期', showHeaderOverflow: true, sortable: true }, { field: 'eta', label: 'ETA', width: 160, title: '目的港ETA', showHeaderOverflow: true, sortable: true },
{ field: 'portload', label: 'PORTLOAD', width: 160, title: '装货港', showHeaderOverflow: true, sortable: true }, { field: 'portload', label: 'PORTLOAD', width: 160, title: '装货港', showHeaderOverflow: true, sortable: true },
{ field: 'shipper', label: 'SHIPPER', width: 160, title: '发货人', showHeaderOverflow: true, sortable: true }, { field: 'shipper', label: 'SHIPPER', width: 160, title: '发货人', showHeaderOverflow: true, sortable: true },
{ {
@ -490,7 +490,9 @@ export default {
title: '装载放行', title: '装载放行',
showHeaderOverflow: true, showHeaderOverflow: true,
slots: { default: 'IsZZFX' } slots: { default: 'IsZZFX' }
} },
{ field: 'startETA', label: 'startETA', width: 120, title: '起始港ETA', showHeaderOverflow: true, sortable: true },
{ field: 'startATA', label: 'startATA', width: 120, title: '起始港ATA', showHeaderOverflow: true, sortable: true }
], ],
// ==== 表单部分 ==== // ==== 表单部分 ====
condAllData: [ condAllData: [

@ -214,7 +214,7 @@ import { XCard, setFormModel } from '@/components'
import columnSetting from '@/components/tableColumnSetting' import columnSetting from '@/components/tableColumnSetting'
import formLabel from './modules/formLabel' import formLabel from './modules/formLabel'
import { import {
BookingOrderPage, PageDataByBooking,
SendTrace, SendTrace,
GetVessellist, GetVessellist,
GetPortlist, GetPortlist,
@ -1068,7 +1068,7 @@ export default {
if (isInit) { if (isInit) {
query.firstFlag = true query.firstFlag = true
} }
BookingOrderPage(query) PageDataByBooking(query)
.then(res => { .then(res => {
console.log('BookingOrderPage==>>', query) console.log('BookingOrderPage==>>', query)
if (res.success) { if (res.success) {

@ -44,16 +44,10 @@
<a-button @click="handleCancel" > <a-button @click="handleCancel" >
关闭 关闭
</a-button> </a-button>
<a-button @click="handleCancel" type="danger">
删除
</a-button>
<a-button @click="handleCancel" >
取消启用
</a-button>
<a-button @click="handleCancel" type="primary">
启用
</a-button>
<a-button @click="handleSubmit" type="primary"> <a-button @click="handleSubmit" type="primary">
保存
</a-button>
<a-button @click="handleSubmitEnable" type="primary">
保存并启用 保存并启用
</a-button> </a-button>
</template> </template>
@ -105,6 +99,29 @@
} }
}) })
}, },
handleSubmitEnable() {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.pkId = null
ServiceProjectSavAndEnable(values).then((res) => {
this.confirmLoading = false
if (res.data.succ) {
this.$message.success('新增成功')
this.handleCancel()
this.$emit('ok', values)
} else {
this.$message.error('新增失败:' + res.data.msg)
}
}).finally((res) => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel () { handleCancel () {
this.form.resetFields() this.form.resetFields()
this.visible = false this.visible = false

@ -1,116 +1,135 @@
<template> <template>
<a-modal <a-modal title="服务项目编辑" :width="900" :visible="visible" @cancel="handleCancel" :confirmLoading="confirmLoading">
title="应用编辑"
:width="900"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form" > <a-form :form="form">
<a-form-item <a-form-item label="服务项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
style="display: none;" <a-input
:labelCol="labelCol" placeholder="服务项目名称"
:wrapperCol="wrapperCol" v-decorator="['serviceProjectName', { rules: [{ required: true, message: '请输入服务项目名称!' }] }]" />
>
<a-input v-decorator="['id']" />
</a-form-item> </a-form-item>
<a-form-item <a-form-item label="服务项目代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
style="display: none;" <a-input
:labelCol="labelCol" placeholder="服务项目代码"
:wrapperCol="wrapperCol" v-decorator="['serviceProjectCode', { rules: [{ required: true, message: '请输入服务项目代码!' }] }]" />
>
<a-input v-decorator="['active']" />
</a-form-item> </a-form-item>
<a-form-item <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
label="应用名称" <a-input-number placeholder="请输入排序" style="width: 100%" v-decorator="['sortNo']" :min="1" :max="1000" />
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入应用名称" v-decorator="['name', {rules: [{required: true, message: ''}]}]" />
</a-form-item> </a-form-item>
<a-form-item <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="服务项目说明">
label="唯一编码" <a-textarea
:labelCol="labelCol" placeholder="服务项目说明"
:wrapperCol="wrapperCol" v-decorator="['serviceProjectNote', { rules: [{ required: true, message: '请输入服务项目说明!' }] }]"
has-feedback :rows="4" />
>
<a-input placeholder="请输入唯一编码" v-decorator="['code', {rules: [{required: true, message: ''}]}]" />
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序"
>
<a-input-number placeholder="请输入排序" style="width: 100%" v-decorator="['sort', { initialValue: 100 }]" :min="1" :max="1000" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
<template slot="footer">
<a-button @click="handleCancel">
关闭
</a-button>
<a-button @click="handleCancel" type="danger">
删除
</a-button>
<a-button @click="handleCancel" >
取消启用
</a-button>
<a-button @click="handleCancel" type="primary">
启用
</a-button>
<a-button @click="handleSubmit" type="primary">
保存
</a-button>
<a-button @click="handleSubmitEnable" type="primary">
保存并启用
</a-button>
</template>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { sysAppEdit } from '@/api/modular/system/appManage' import { ServiceProjectSavAndEnable, ServiceProjectSave } from '@/api/modular/system/appManage'
export default { export default {
data () { data() {
return { return {
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 5 } sm: { span: 5 }
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 15 } sm: { span: 15 }
}, },
visible: false, pkId:"",
confirmLoading: false, visible: false,
visibleDef: false, confirmLoading: false,
form: this.$form.createForm(this) form: this.$form.createForm(this)
} }
},
methods: {
//
edit(record) {
this.visible = true
setTimeout(() => {
this.form.setFieldsValue(
{
serviceProjectCode: record.serviceProjectCode,
serviceProjectName: record.serviceProjectName,
sortNo: record.sortNo,
serviceProjectNote: record.serviceProjectNote
}
)
this.pkId = record.pkId
}, 100)
}, },
methods: { handleSubmit() {
// const { form: { validateFields } } = this
edit (record) { this.confirmLoading = true
this.visible = true validateFields((errors, values) => {
setTimeout(() => { if (!errors) {
this.form.setFieldsValue( values.pkId = this.pkId
{ ServiceProjectSave(values).then((res) => {
id: record.id, this.confirmLoading = false
name: record.name, if (res.data.succ) {
code: record.code, this.$message.success('新增成功')
sort: record.sort, this.handleCancel()
active: record.active this.$emit('ok', values)
} else {
this.$message.error('新增失败:' + res.data.msg)
} }
) }).finally((res) => {
}, 100)
},
handleSubmit () {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
sysAppEdit(values).then((res) => {
if (res.success) {
this.$message.success('编辑成功')
this.visible = false
this.confirmLoading = false
this.$emit('ok', values)
} else {
this.$message.error('编辑失败:' + res.message)
}
}).finally((res) => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false this.confirmLoading = false
} })
}) } else {
}, this.confirmLoading = false
handleCancel () { }
this.form.resetFields() })
this.visible = false },
} handleSubmitEnable() {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.pkId = this.pkId
ServiceProjectSavAndEnable(values).then((res) => {
this.confirmLoading = false
if (res.data.succ) {
this.$message.success('新增成功')
this.handleCancel()
this.$emit('ok', values)
} else {
this.$message.error('新增失败:' + res.data.msg)
}
}).finally((res) => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
} }
} }
}
</script> </script>

@ -55,23 +55,30 @@
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model > </a-form-model>
</div> </div>
</x-card> </x-card>
<a-card :bordered="false"> <a-card :bordered="false">
<a-button @click="$refs.addForm.add()" type="primary">新增</a-button> <div style="margin-bottom: 10px;">
<a-button @click="$refs.addForm.add()" type="primary">启用</a-button> <a-button @click="$refs.addForm.add()" type="primary">新增</a-button>
<a-button @click="$refs.addForm.add()"></a-button> <a-button @click="handleStart" type="primary">启用</a-button>
<a-button @click="$refs.addForm.add()" type="danger">作废</a-button> <a-button @click="handleStop"></a-button>
<a-popconfirm title="确认作废吗?" @confirm="handleDelete">
<a-button type="danger">作废</a-button>
</a-popconfirm>
</div>
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<a-table <a-table
ref="table" ref="table"
:columns="columns" :columns="columns"
:data="list" :data-source="list"
:pagination="pagination" :pagination="pagination"
@change="tablePaginationChange" @change="tablePaginationChange"
:rowKey="(record) => record.id" :rowKey="(record) => record.pkId"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"> :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<span slot="action" slot-scope="text, record">
<a @click="$refs.editForm.edit(record)"></a>
</span>
</a-table> </a-table>
<add-form ref="addForm" @ok="handleOk" /> <add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" /> <edit-form ref="editForm" @ok="handleOk" />
@ -85,7 +92,10 @@ import {
XCard XCard
} from '@/components' } from '@/components'
import { import {
ServiceProjectGetPage ServiceProjectGetPage,
ServiceProjectSetEnable,
ServiceProjectSetUnEnable,
ServiceProjectDelete
} from '@/api/modular/system/appManage' } from '@/api/modular/system/appManage'
import editForm from './editForm' import editForm from './editForm'
import addForm from './addForm' import addForm from './addForm'
@ -183,11 +193,63 @@ export default {
}, },
methods: { methods: {
handleOk() { handleOk() {
this.$refs.table.refresh() this.getList()
},
handleStart() {
if (this.selectedRowKeys.length > 0) {
const data = {
pkId: this.selectedRowKeys.join(',')
}
ServiceProjectSetEnable(data).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
})
} else {
this.$message.warning('请选择')
}
},
handleStop() {
if (this.selectedRowKeys.length > 0) {
const data = {
pkId: this.selectedRowKeys.join(',')
}
ServiceProjectSetUnEnable(data).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
})
} else {
this.$message.warning('请选择')
}
},
handleDelete() {
if (this.selectedRowKeys.length > 0) {
const data = {
pkId: this.selectedRowKeys.join(',')
}
ServiceProjectDelete(data).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.data.msg)
}
})
} else {
this.$message.warning('请选择')
}
}, },
handleRefsh() { handleRefsh() {
this.$refs.query.resetFields() this.$refs.query.resetFields()
this.queryParam = { create: [], update: [] } this.queryParam = { create: [], update: [] }
this.getList()
}, },
handleSearch() { handleSearch() {
if (this.queryParam.create.length > 0) { if (this.queryParam.create.length > 0) {
@ -217,6 +279,7 @@ export default {
tablePaginationChange(pagination) { tablePaginationChange(pagination) {
this.pagination.current = pagination.current this.pagination.current = pagination.current
this.pagination.pageSize = pagination.pageSize this.pagination.pageSize = pagination.pageSize
this.getList()
}, },
onSelectChange(selectedRowKeys, selectedRows) { onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys

Loading…
Cancel
Save