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

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

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

@ -51,18 +51,19 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<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="请输入描述"
v-decorator="['description', { rules: [{ required: true, message: '请输入描述!' }] }]"
/>
</a-form-item>
</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-form>
</a-spin>
@ -77,15 +78,15 @@ export default {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 4 }
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
@ -93,12 +94,29 @@ export default {
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
data: {}
form: this.$form.createForm(this)
}
},
mounted() {},
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() {
const {
form: { validateFields }

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

Loading…
Cancel
Save