|
@@ -103,7 +103,9 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="8">
|
|
<a-col :span="8">
|
|
<a-form-model-item label="收款方式" prop="settleStyleSn">
|
|
<a-form-model-item label="收款方式" prop="settleStyleSn">
|
|
- <v-select code="SETTLE_STYLE_NAME" id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式"></v-select>
|
|
|
|
|
|
+ <a-select id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式">
|
|
|
|
+ <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
|
|
|
|
+ </a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -111,7 +113,7 @@
|
|
<a-col :span="8">
|
|
<a-col :span="8">
|
|
<a-form-model-item label="客户类型" prop="customerTypeSn">
|
|
<a-form-model-item label="客户类型" prop="customerTypeSn">
|
|
<a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
|
|
<a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
|
|
- <a-select-option v-for="item in custTypeList" :value="item.customersTypeSn" :key="item.customersTypeSn">{{ item.customersTypeName }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -127,8 +129,8 @@
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { getArea } from '@/api/data'
|
|
import { getArea } from '@/api/data'
|
|
-import { custSave, custFindById } from '@/api/customer'
|
|
|
|
-import { custTypeAllList } from '@/api/custType'
|
|
|
|
|
|
+import { custSave, custFindById, settleStyleFindAllList } from '@/api/customer'
|
|
|
|
+import { custTypeFindAllList } from '@/api/custType'
|
|
export default {
|
|
export default {
|
|
name: 'CustomerManagementEdit',
|
|
name: 'CustomerManagementEdit',
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
@@ -155,7 +157,7 @@ export default {
|
|
customerTypeSn: undefined, // 客户类型
|
|
customerTypeSn: undefined, // 客户类型
|
|
priceType: '', // 价格类型
|
|
priceType: '', // 价格类型
|
|
payType: '', // 支付方式
|
|
payType: '', // 支付方式
|
|
- settleStyleSn: '' // 收款方式
|
|
|
|
|
|
+ settleStyleSn: undefined // 收款方式
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
|
|
customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
|
|
@@ -170,7 +172,8 @@ export default {
|
|
addrProvinceList: [], // 省下拉
|
|
addrProvinceList: [], // 省下拉
|
|
addrCityList: [], // 市下拉
|
|
addrCityList: [], // 市下拉
|
|
addrDistrictList: [], // 区下拉
|
|
addrDistrictList: [], // 区下拉
|
|
- custTypeList: [] // 客户类型 下拉数据
|
|
|
|
|
|
+ custTypeList: [], // 客户类型 下拉数据
|
|
|
|
+ settleStyleList: [] // 收款方式 下拉数据
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -188,9 +191,21 @@ export default {
|
|
},
|
|
},
|
|
// 客户类型
|
|
// 客户类型
|
|
getCustTypeList () {
|
|
getCustTypeList () {
|
|
- custTypeAllList({}).then(res => {
|
|
|
|
|
|
+ custTypeFindAllList().then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.custTypeList = res.data
|
|
this.custTypeList = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.custTypeList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 收款方式
|
|
|
|
+ getSettleStyleList () {
|
|
|
|
+ settleStyleFindAllList().then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.settleStyleList = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.settleStyleList = []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -285,6 +300,7 @@ export default {
|
|
next(vm => {
|
|
next(vm => {
|
|
vm.getArea('province') // 省市区
|
|
vm.getArea('province') // 省市区
|
|
vm.getCustTypeList() // 客户类型
|
|
vm.getCustTypeList() // 客户类型
|
|
|
|
+ vm.getSettleStyleList() // 收款方式
|
|
vm.$refs.ruleForm.resetFields()
|
|
vm.$refs.ruleForm.resetFields()
|
|
if (vm.$route.params.id) {
|
|
if (vm.$route.params.id) {
|
|
// 编辑页
|
|
// 编辑页
|