修改问题

master
sunzehua 1 year ago
parent b63203cc34
commit d0b1acb1d6

@ -132,24 +132,24 @@ export function ServiceProjectSavAndEnable (parameter) {
export function ServiceProjectSetEnable (parameter) {
return axios({
url: '/ServiceProject/SetEnable',
method: 'get',
params: parameter
method: 'post',
data: parameter
})
}
export function ServiceProjectSetUnEnable (parameter) {
return axios({
url: '/ServiceProject/SetUnEnable',
method: 'get',
params: parameter
method: 'post',
data: parameter
})
}
export function ServiceProjectDelete (parameter) {
return axios({
url: '/ServiceProject/Delete',
method: 'get',
params: parameter
method: 'post',
data: parameter
})
}
@ -168,3 +168,68 @@ export function ServiceProjectQueryList (parameter) {
params: parameter
})
}
// 服务状态
export function StatusSkuBaseGetPage (parameter) {
return axios({
url: '/StatusSkuBase/GetPage',
method: 'post',
data: parameter
})
}
export function StatusSkuBaseSave (parameter) {
return axios({
url: '/StatusSkuBase/Save',
method: 'post',
data: parameter
})
}
export function StatusSkuBaseSavAndEnable (parameter) {
return axios({
url: '/StatusSkuBase/SaveAndEnable',
method: 'post',
data: parameter
})
}
export function StatusSkuBaseSetEnable (parameter) {
return axios({
url: '/StatusSkuBase/SetEnable',
method: 'post',
data: parameter
})
}
export function StatusSkuBaseSetUnEnable (parameter) {
return axios({
url: '/StatusSkuBase/SetUnEnable',
method: 'post',
data: parameter
})
}
export function StatusSkuBaseDelete (parameter) {
return axios({
url: '/StatusSkuBase/Delete',
method: 'post',
data: parameter
})
}
export function StatusSkuBaseGetInfo (parameter) {
return axios({
url: '/StatusSkuBase/GetInfo',
method: 'get',
params: parameter
})
}
export function StatusSkuBaseQueryList (parameter) {
return axios({
url: '/StatusSkuBase/QueryList',
method: 'get',
params: parameter
})
}

@ -732,7 +732,8 @@ export default {
shipper: $data.bookingDetails.shipper,
consignee: $data.bookingDetails.consignee,
notifyparty: $data.bookingDetails.notifyparty,
goodsStatus: $data.bookingDetails.goodsStatus
goodsStatus: $data.bookingDetails.goodsStatus,
sale: $data.bookingDetails.sale
}
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
} else {
@ -1130,7 +1131,8 @@ export default {
shippingMethod: res.data.shippingMethod,
shipper: res.data.shipper,
consignee: res.data.consignee,
notifyparty: res.data.notifyparty
notifyparty: res.data.notifyparty,
sale: res.data.bookingDetails.sale
}
newData = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
}

@ -34,7 +34,7 @@
<a-select
show-search
placeholder="请选择船公司"
v-decorator="['carrierid', { rules: [{ required: true, message: '请选择船公司!' }] }]"
v-decorator="['carrierid']"
@search="CarrierHandleSearch"
:default-active-first-option="false"
:show-arrow="false"
@ -101,6 +101,12 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="主动模式" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-checkbox v-decorator="['ftpModeActive']" >
</a-checkbox>
</a-form-item>
</a-col>
<a-divider orientation="left">发送方</a-divider>
<a-col :span="8">
<a-form-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>

@ -34,7 +34,7 @@
<a-select
show-search
placeholder="请选择船公司"
v-decorator="['carrierid', { rules: [{ required: true, message: '请选择船公司!' }] }]"
v-decorator="['carrierid']"
@search="CarrierHandleSearch"
:default-active-first-option="false"
:show-arrow="false"
@ -101,6 +101,12 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="主动模式" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<a-checkbox v-model="ftpModeActive" v-decorator="['ftpModeActive']" >
</a-checkbox>
</a-form-item>
</a-col>
<a-divider orientation="left">发送方</a-divider>
<a-col :span="8">
<a-form-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
@ -214,6 +220,7 @@ export default {
sm: { span: 15 }
},
typeData: [],
ftpModeActive: false,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
@ -253,6 +260,7 @@ export default {
setTimeout(() => {
this.form.setFieldsValue({
edicode: record.edicode,
ftpModeActive: true,
serverip: record.serverip,
foldername: record.foldername,
username: record.username,
@ -278,6 +286,7 @@ export default {
aliassendcode: record.aliassendcode,
sendshippercode: record.sendshippercode
})
this.ftpModeActive = record.ftpModeActive
console.log(this.form.getFieldsValue())
}, 100)
},
@ -307,7 +316,7 @@ export default {
}
})
// console.log(this.form, values.id)
let data = { ...values, id: this.data.id }
const data = { ...values, id: this.data.id }
DjyEdiSettingSave(data)
.then(res => {
if (res.success) {

@ -27,13 +27,13 @@
<a-button @click="handleCancel">
关闭
</a-button>
<a-button @click="handleCancel" type="danger">
<a-button @click="handleDelete" type="danger">
删除
</a-button>
<a-button @click="handleCancel" >
<a-button @click="handleUnable">
取消启用
</a-button>
<a-button @click="handleCancel" type="primary">
<a-button @click="handleAble" type="primary">
启用
</a-button>
<a-button @click="handleSubmit" type="primary">
@ -46,7 +46,7 @@
</a-modal>
</template>
<script>
import { ServiceProjectSavAndEnable, ServiceProjectSave } from '@/api/modular/system/appManage'
import { ServiceProjectSavAndEnable, ServiceProjectSave, ServiceProjectDelete, ServiceProjectSetUnEnable, ServiceProjectSetEnable } from '@/api/modular/system/appManage'
export default {
data() {
return {
@ -58,7 +58,7 @@ export default {
xs: { span: 24 },
sm: { span: 15 }
},
pkId:"",
pkId: '',
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
@ -80,6 +80,37 @@ export default {
this.pkId = record.pkId
}, 100)
},
handleDelete() {
ServiceProjectDelete([this.pkId]).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.visible = false
this.$emit('ok')
} else {
this.$message.error(res.data.msg)
}
})
},
handleUnable() {
ServiceProjectSetUnEnable([this.pkId]).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
}
})
},
handleAble() {
ServiceProjectSetEnable([this.pkId]).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
}
})
},
handleSubmit() {
const { form: { validateFields } } = this
this.confirmLoading = true
@ -91,7 +122,7 @@ export default {
if (res.data.succ) {
this.$message.success('新增成功')
this.handleCancel()
this.$emit('ok', values)
this.$emit('ok')
} else {
this.$message.error('新增失败:' + res.data.msg)
}

@ -197,10 +197,7 @@ export default {
},
handleStart() {
if (this.selectedRowKeys.length > 0) {
const data = {
pkId: this.selectedRowKeys.join(',')
}
ServiceProjectSetEnable(data).then(res => {
ServiceProjectSetEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.getList()
@ -214,10 +211,7 @@ export default {
},
handleStop() {
if (this.selectedRowKeys.length > 0) {
const data = {
pkId: this.selectedRowKeys.join(',')
}
ServiceProjectSetUnEnable(data).then(res => {
ServiceProjectSetUnEnable(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.getList()
@ -231,10 +225,7 @@ export default {
},
handleDelete() {
if (this.selectedRowKeys.length > 0) {
const data = {
pkId: this.selectedRowKeys.join(',')
}
ServiceProjectDelete(data).then(res => {
ServiceProjectDelete(this.selectedRowKeys).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.getList()
@ -260,7 +251,7 @@ export default {
this.queryParam.updateBegin = this.queryParam.update[0]
this.queryParam.updateEnd = this.queryParam.update[1]
}
console.log(this.queryParam)
this.getList()
},
getList() {
const data = {

@ -0,0 +1,144 @@
<template>
<a-modal
title="服务项目编辑"
:width="900"
:visible="visible"
@cancel="handleCancel"
:confirmLoading="confirmLoading"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item
label="状态名称"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="状态名称" v-decorator="['statusSKUName', {rules: [{required: true, message: ''}]}]" />
</a-form-item>
<a-form-item
label="状态代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="状态代码" v-decorator="['statusSKUCode', {rules: [{required: true, message: ''}]}]" />
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="显示颜色"
>
<a-input style="width: 85%;margin-right: 20px;" placeholder="显示颜色" v-decorator="['backgroundColor', {rules: [{required: true, message: ''}]}]" />
<input @input="handleColor($event)" type="color">
</a-form-item>
<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
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="状态说明"
>
<a-textarea placeholder="状态说明" v-decorator="['statusSKUNote', {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="handleSubmit" type="primary">
保存
</a-button>
<a-button @click="handleSubmitEnable" type="primary">
保存并启用
</a-button>
</template>
</a-modal>
</template>
<script>
import { StatusSkuBaseSave,StatusSkuBaseSavAndEnable } 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,
form: this.$form.createForm(this)
}
},
methods: {
//
add () {
this.visible = true
},
handleSubmit () {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.pkId = null
StatusSkuBaseSave(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
}
})
},
handleColor(e) {
this.form.setFieldsValue({
backgroundColor: e.target.value
})
},
handleSubmitEnable() {
const { form: { validateFields } } = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.pkId = null
StatusSkuBaseSavAndEnable(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>

@ -0,0 +1,166 @@
<template>
<a-modal title="服务项目编辑" :width="900" :visible="visible" @cancel="handleCancel" :confirmLoading="confirmLoading">
<a-spin :spinning="confirmLoading">
<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 label="服务项目代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="服务项目代码"
v-decorator="['serviceProjectCode', { rules: [{ required: true, message: '请输入服务项目代码!' }] }]" />
</a-form-item>
<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 :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="handleDelete" type="danger">
删除
</a-button>
<a-button @click="handleUnable">
取消启用
</a-button>
<a-button @click="handleAble" 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 { ServiceProjectSavAndEnable, ServiceProjectSave, ServiceProjectDelete, ServiceProjectSetUnEnable, ServiceProjectSetEnable } 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)
},
handleDelete() {
ServiceProjectDelete([this.pkId]).then(res => {
if (res.data.succ) {
this.$message.success('删除成功')
this.visible = false
this.$emit('ok')
} else {
this.$message.error(res.data.msg)
}
})
},
handleUnable() {
ServiceProjectSetUnEnable([this.pkId]).then(res => {
if (res.data.succ) {
this.$message.success('取消启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
}
})
},
handleAble() {
ServiceProjectSetEnable([this.pkId]).then(res => {
if (res.data.succ) {
this.$message.success('启用成功')
this.visible = false
} else {
this.$message.error(res.data.msg)
}
})
},
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')
} else {
this.$message.error('新增失败:' + res.data.msg)
}
}).finally((res) => {
this.confirmLoading = 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>

@ -0,0 +1,294 @@
<template>
<div>
<x-card>
<div slot="content" class="table-page-search-wrapper">
<a-form-model ref="query" layout="inline">
<a-row :gutter="10">
<a-col :md="6" :sm="24">
<a-form-item label="服务名称">
<a-input v-model="queryParam.serviceProjectName" allow-clear placeholder="服务名称" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="创建时间">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.create">
</a-range-picker>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="是否启用">
<a-select v-model="queryParam.isEnable" default-value="lucy">
<a-select-option value="1">
</a-select-option>
<a-select-option value="2">
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="创建人">
<a-input v-model="queryParam.createUser" allow-clear placeholder="创建人" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="服务说明">
<a-input v-model="queryParam.serviceProjectNote" allow-clear placeholder="服务说明" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="更新时间">
<a-range-picker valueFormat="YYYY-MM-DD" v-model="queryParam.update">
</a-range-picker>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="更新人">
<a-input v-model="queryParam.updateUser" allow-clear placeholder="更新人" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="handleSearch"></a-button>
<a-button style="margin-left: 8px" @click="handleRefsh"></a-button>
</span>
</a-col>
</a-row>
</a-form-model>
</div>
</x-card>
<a-card :bordered="false">
<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-source="list"
:pagination="pagination"
@change="tablePaginationChange"
: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" />
</a-spin>
</a-card>
</div>
</template>
<script>
import {
STable,
XCard
} from '@/components'
import {
StatusSkuBaseGetPage,
StatusSkuBaseSetEnable,
StatusSkuBaseSetUnEnable,
StatusSkuBaseDelete
} from '@/api/modular/system/appManage'
import editForm from './editForm'
import addForm from './addForm'
export default {
components: {
XCard,
STable,
editForm,
addForm
},
data() {
return {
// description: '',
labelCol: {
xs: {
span: 24
},
sm: {
span: 5
}
},
wrapperCol: {
xs: {
span: 24
},
sm: {
span: 16
}
},
//
queryParam: {
create: [],
update: []
},
//
columns: [{
title: '状态名称',
dataIndex: 'statusSKUName'
},
{
title: '状态代码',
dataIndex: 'statusSKUCode'
},
{
title: '顺序号',
dataIndex: 'sortNo'
},
{
title: '说明',
dataIndex: 'statusSKUNote'
},
{
title: '显示颜色',
dataIndex: 'backgroundColor'
},
{
title: '是否启用',
dataIndex: 'isEnable'
},
{
title: '创建日期',
dataIndex: 'createdTime'
},
{
title: '创建人',
dataIndex: 'createdUserName'
},
{
title: '更新日期',
dataIndex: 'updatedTime'
},
{
title: '更新人',
dataIndex: 'updatedUserName'
},
{
title: '操作',
width: '200px',
dataIndex: 'action',
scopedSlots: {
customRender: 'action'
}
}
],
loading: false,
list: [],
selectedRowKeys: [],
pagination: {
current: 1,
total: 0, //
showSizeChanger: true,
pageSizeOptions: ['1', '10', '20', '40', '80', '100'],
pageSize: 10
}
}
},
created() {
this.getList()
},
methods: {
handleOk() {
this.getList()
},
handleStart() {
if (this.selectedRowKeys.length > 0) {
StatusSkuBaseSetEnable(this.selectedRowKeys).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) {
StatusSkuBaseSetUnEnable(this.selectedRowKeys).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) {
StatusSkuBaseDelete(this.selectedRowKeys).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) {
this.queryParam.createBegin = this.queryParam.create[0]
this.queryParam.createEnd = this.queryParam.create[1]
}
if (this.queryParam.update.length > 0) {
this.queryParam.updateBegin = this.queryParam.update[0]
this.queryParam.updateEnd = this.queryParam.update[1]
}
this.getList()
},
getList() {
const data = {
pageNo: this.pagination.current,
pageSize: this.pagination.pageSize,
...this.queryParam
}
StatusSkuBaseGetPage(data).then(res => {
if (res.success) {
this.list = res.data.items
} else {
this.$message.error(res.message)
}
})
},
tablePaginationChange(pagination) {
this.pagination.current = pagination.current
this.pagination.pageSize = pagination.pageSize
this.getList()
},
onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows
}
}
}
</script>
<style scoped>
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
</style>
Loading…
Cancel
Save