dev
张同海 2 years ago
parent f54eca2346
commit 51c7c0ac7e

@ -7,7 +7,7 @@ import { axios } from '@/utils/request'
*/ */
export function CommondbCodeCountryList(parameter) { export function CommondbCodeCountryList(parameter) {
return axios({ return axios({
url: '/commondb/code-country-list', url: '/api/commondb/code-country-list',
method: 'post', method: 'post',
params: parameter params: parameter
}) })

@ -98,6 +98,10 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
//
add(record) {
this.visible = true
},
/** /**
* 提交表单 * 提交表单
*/ */

@ -51,18 +51,19 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input <a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea
:autosize="{ minRows: 3 }"
placeholder="请输入描述" placeholder="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]" v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
@ -77,15 +78,15 @@ export default {
TypeData: [], TypeData: [],
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 7 } sm: { span: 6 }
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 15 } sm: { span: 16 }
}, },
labelCol2: { labelCol2: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 4 } sm: { span: 3 }
}, },
wrapperCol2: { wrapperCol2: {
xs: { span: 24 }, xs: { span: 24 },
@ -93,12 +94,29 @@ export default {
}, },
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this)
data: {}
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
code: record.code,
enName: record.enName,
cnName: record.cnName,
capital: record.capital,
continent: record.continent,
description: record.description,
remark: record.remark
})
console.log(this.form.getFieldsValue())
}, 100)
},
handleSubmit() { handleSubmit() {
const { const {
form: { validateFields } form: { validateFields }

@ -10,7 +10,7 @@
<a-row :gutter="48"> <a-row :gutter="48">
<a-col :md="18"> <a-col :md="18">
<a-row :gutter="48"> <a-row :gutter="48">
<a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`"> <!-- <a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-form-item <a-form-item
:label="item.title" :label="item.title"
v-if=" v-if="
@ -19,6 +19,11 @@
> >
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" /> <a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
</a-form-item> </a-form-item>
</a-col> -->
<a-col :md="8" :sm="24">
<a-form-item label="关键字:">
<a-input v-model="queryParam.KeyWord" allow-clear placeholder="请输入关键字" />
</a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
@ -45,7 +50,7 @@
</template> </template>
</vxe-toolbar> </vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text=""> <vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-column type="seq" width="40" fixed="left"></vxe-column> <vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column <vxe-column
v-for="item in columns" v-for="item in columns"
:key="`${item.dataIndex}3`" :key="`${item.dataIndex}3`"
@ -53,6 +58,7 @@
:min-width="item.width" :min-width="item.width"
:title="item.title" :title="item.title"
:align="item.align" :align="item.align"
:show-overflow="true"
> >
</vxe-column> </vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center"> <vxe-column title="操作" fixed="right" width="200" align="center">
@ -68,7 +74,6 @@
</template> </template>
<script> <script>
import { CommondbCodeCountryList } from '@/api/modular/main/CommondbCodeCountry' import { CommondbCodeCountryList } from '@/api/modular/main/CommondbCodeCountry'
import { commondbModules, commondbCarrierlist } from '@/api/modular/main/ShippingCompanyMapping'
import addForm from './addForm.vue' import addForm from './addForm.vue'
import editForm from './editForm.vue' import editForm from './editForm.vue'
export default { export default {
@ -155,26 +160,18 @@ export default {
Object.assign(this.$data, this.$options.data()) Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns this.ColumnsQuery = this.columns
this.FnGetData() this.FnGetData()
commondbPackage().then(res => {
this.CodeData = res.data
this.WCodeData = res.data
})
}, },
FnGetData() { FnGetData() {
if (this.queryParam.module) { this.loading = true
this.loading = true CommondbCodeCountryList(this.queryParam).then(res => {
CommondbCodeCountryList(this.queryParam).then(res => { if (res.code == 200) {
if (res.code == 200) { this.loadData = res.data
this.loadData = res.data } else {
} else { this.loadData = []
this.loadData = [] this.$message.warning(res.message)
this.$message.warning(res.message) }
} this.loading = false
this.loading = false })
})
} else {
this.$message.warning('请选择模块!')
}
}, },
handleOk() { handleOk() {
this.FnGetData() this.FnGetData()

Loading…
Cancel
Save