|
|
|
|
@ -112,6 +112,26 @@
|
|
|
|
|
"
|
|
|
|
|
>录入</Button
|
|
|
|
|
>
|
|
|
|
|
<el-select
|
|
|
|
|
style="margin-top: 4px"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-model="scope.row.status"
|
|
|
|
|
placeholder="状态标识"
|
|
|
|
|
@change="e => {
|
|
|
|
|
save(scope.row).then(res => getCustomers)
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in [
|
|
|
|
|
{ value: 1, label: '正常' },
|
|
|
|
|
{ value: 2, label: '暂停' },
|
|
|
|
|
{ value: 3, label: '退签' },
|
|
|
|
|
]"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
@ -136,12 +156,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getList, destroy } from "@/api/customer";
|
|
|
|
|
import { getList, destroy,save } from "@/api/customer";
|
|
|
|
|
import { getparameter } from "@/api/system/dictionary";
|
|
|
|
|
import { getList as getUnit } from "@/api/payUnit";
|
|
|
|
|
import { getList as getTypes } from "@/api/productType";
|
|
|
|
|
import { deepCopy } from "@/utils";
|
|
|
|
|
import {getAuthAreas, getAuthTypes} from "@/utils/auth"
|
|
|
|
|
import { getAuthAreas, getAuthTypes } from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
import addCustomer from "@/views/customer/component/addCustomer";
|
|
|
|
|
import addOrder from "./component/addOrder";
|
|
|
|
|
@ -328,6 +348,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
save,
|
|
|
|
|
async getLevelTypes() {
|
|
|
|
|
const types = await getparameter(
|
|
|
|
|
{
|
|
|
|
|
@ -369,11 +390,11 @@ export default {
|
|
|
|
|
|
|
|
|
|
async getTypes() {
|
|
|
|
|
this.types = getAuthTypes(this);
|
|
|
|
|
this.select.product_type_id = this.types.map(item => item.id)
|
|
|
|
|
this.select.product_type_id = this.types.map((item) => item.id);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getCity() {
|
|
|
|
|
let authAreaIds = getAuthAreas(this).map(item => item.id)
|
|
|
|
|
let authAreaIds = getAuthAreas(this).map((item) => item.id);
|
|
|
|
|
let city = await getparameter(
|
|
|
|
|
{
|
|
|
|
|
number: "city",
|
|
|
|
|
@ -387,13 +408,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
false
|
|
|
|
|
);
|
|
|
|
|
let resArea = []
|
|
|
|
|
area?.detail.forEach(item => {
|
|
|
|
|
if(authAreaIds.indexOf(item.id) !== -1){
|
|
|
|
|
resArea.push(item)
|
|
|
|
|
let resArea = [];
|
|
|
|
|
area?.detail.forEach((item) => {
|
|
|
|
|
if (authAreaIds.indexOf(item.id) !== -1) {
|
|
|
|
|
resArea.push(item);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
city.detail[i].children = resArea
|
|
|
|
|
});
|
|
|
|
|
city.detail[i].children = resArea;
|
|
|
|
|
|
|
|
|
|
for (let j = 0; j < area.detail.length; j++) {
|
|
|
|
|
let street = await getparameter(
|
|
|
|
|
@ -421,14 +442,16 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
created() {
|
|
|
|
|
this.getDisabilityLevel();
|
|
|
|
|
this.getLevelTypes();
|
|
|
|
|
this.getCustomers();
|
|
|
|
|
this.getCity();
|
|
|
|
|
this.getAccounts();
|
|
|
|
|
this.getTypes();
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
|
await this.getTypes();
|
|
|
|
|
await this.getCustomers();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|