修改问题

master
sunzehua 1 year ago
parent 032f12040a
commit b63203cc34

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

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

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

@ -63,7 +63,7 @@ export default {
{
field: 'operate',
title: '操作',
width: 110,
width: 50,
noDraggable: true,
slots: { default: 'operate' },
fixed: 'right',
@ -223,7 +223,7 @@ export default {
sortable: true,
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: 'shipper', label: 'SHIPPER', width: 160, title: '发货人', showHeaderOverflow: true, sortable: true },
{
@ -490,7 +490,9 @@ export default {
title: '装载放行',
showHeaderOverflow: true,
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: [

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

@ -44,16 +44,10 @@
<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>
@ -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 () {
this.form.resetFields()
this.visible = false

@ -1,116 +1,135 @@
<template>
<a-modal
title="应用编辑"
:width="900"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-modal title="服务项目编辑" :width="900" :visible="visible" @cancel="handleCancel" :confirmLoading="confirmLoading">
<a-spin :spinning="confirmLoading">
<a-form :form="form" >
<a-form-item
style="display: none;"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
<a-input v-decorator="['id']" />
<a-form :form="form">
<a-form-item label="服务项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="服务项目名称"
v-decorator="['serviceProjectName', { rules: [{ required: true, message: '请输入服务项目名称!' }] }]" />
</a-form-item>
<a-form-item
style="display: none;"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
<a-input v-decorator="['active']" />
<a-form-item label="服务项目代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="服务项目代码"
v-decorator="['serviceProjectCode', { rules: [{ required: true, message: '请输入服务项目代码!' }] }]" />
</a-form-item>
<a-form-item
label="应用名称"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入应用名称" v-decorator="['name', {rules: [{required: true, message: ''}]}]" />
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
<a-input-number placeholder="请输入排序" style="width: 100%" v-decorator="['sortNo']" :min="1" :max="1000" />
</a-form-item>
<a-form-item
label="唯一编码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<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 :labelCol="labelCol" :wrapperCol="wrapperCol" label="服务项目说明">
<a-textarea
placeholder="服务项目说明"
v-decorator="['serviceProjectNote', { rules: [{ required: true, message: '请输入服务项目说明!' }] }]"
:rows="4" />
</a-form-item>
</a-form>
</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>
</template>
<script>
import { sysAppEdit } from '@/api/modular/system/appManage'
export default {
data () {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
visible: false,
confirmLoading: false,
visibleDef: false,
form: this.$form.createForm(this)
}
import { ServiceProjectSavAndEnable, ServiceProjectSave } from '@/api/modular/system/appManage'
export default {
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
pkId:"",
visible: false,
confirmLoading: false,
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: {
//
edit (record) {
this.visible = true
setTimeout(() => {
this.form.setFieldsValue(
{
id: record.id,
name: record.name,
code: record.code,
sort: record.sort,
active: record.active
handleSubmit() {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.pkId = this.pkId
ServiceProjectSave(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)
}
)
}, 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 {
}).finally((res) => {
this.confirmLoading = false
}
})
},
handleCancel () {
this.form.resetFields()
this.visible = false
}
})
} else {
this.confirmLoading = 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>

@ -55,23 +55,30 @@
</span>
</a-col>
</a-row>
</a-form-model >
</a-form-model>
</div>
</x-card>
<a-card :bordered="false">
<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="$refs.addForm.add()" type="danger">作废</a-button>
<div style="margin-bottom: 10px;">
<a-button @click="$refs.addForm.add()" type="primary">新增</a-button>
<a-button @click="handleStart" type="primary">启用</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-table
ref="table"
:columns="columns"
:data="list"
:data-source="list"
:pagination="pagination"
@change="tablePaginationChange"
:rowKey="(record) => record.id"
:rowKey="(record) => record.pkId"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<span slot="action" slot-scope="text, record">
<a @click="$refs.editForm.edit(record)"></a>
</span>
</a-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
@ -85,7 +92,10 @@ import {
XCard
} from '@/components'
import {
ServiceProjectGetPage
ServiceProjectGetPage,
ServiceProjectSetEnable,
ServiceProjectSetUnEnable,
ServiceProjectDelete
} from '@/api/modular/system/appManage'
import editForm from './editForm'
import addForm from './addForm'
@ -183,11 +193,63 @@ export default {
},
methods: {
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() {
this.$refs.query.resetFields()
this.queryParam = { create: [], update: [] }
this.getList()
},
handleSearch() {
if (this.queryParam.create.length > 0) {
@ -217,6 +279,7 @@ export default {
tablePaginationChange(pagination) {
this.pagination.current = pagination.current
this.pagination.pageSize = pagination.pageSize
this.getList()
},
onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys

Loading…
Cancel
Save