|
@@ -159,19 +159,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- deleteCondition,
|
|
|
- deleteMaterialPolicy,
|
|
|
- getConditionList,
|
|
|
- getCrList,
|
|
|
- getCustomerList,
|
|
|
- toExamine
|
|
|
-} from '@/api/policy_list'
|
|
|
+import { deleteCondition, deleteMaterialPolicy, getConditionList, getCrList, getCustomerList } from '@/api/policy_list'
|
|
|
import { downloadFiles, handleImport } from '@/utils/util'
|
|
|
import EditCondition from './EditCondition'
|
|
|
import ImageUpload from '@/components/Common/image-upload.vue'
|
|
|
import Minxin from '@/mixin'
|
|
|
-import { mapState } from 'vuex'
|
|
|
|
|
|
export default {
|
|
|
name: 'Examine',
|
|
@@ -180,10 +172,12 @@ export default {
|
|
|
ImageUpload
|
|
|
},
|
|
|
mixins: [Minxin],
|
|
|
+ // eslint-disable-next-line vue/require-prop-types
|
|
|
+ props: ['code'],
|
|
|
data() {
|
|
|
return {
|
|
|
- keyword:'',
|
|
|
- region:'',
|
|
|
+ keyword: '',
|
|
|
+ region: '',
|
|
|
baseURL: '',
|
|
|
dcurrentPage: 1,
|
|
|
dpageSize: 10,
|
|
@@ -237,17 +231,23 @@ export default {
|
|
|
value: 'LIMIT',
|
|
|
label: '限量'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ comCode: ''
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapState({
|
|
|
- comCode: (state) => state.sales.code ,
|
|
|
- }),
|
|
|
+ created() {
|
|
|
+ this.comCode = this.code
|
|
|
+ console.log(this.code,'kkkkk')
|
|
|
+ this.getCond()
|
|
|
+ },
|
|
|
+ updated() {
|
|
|
+ this.comCode = this.code
|
|
|
+ console.log(this.code,'kkkkk')
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.getCrList()
|
|
|
+ this.getCond()
|
|
|
},
|
|
|
getCrList() {
|
|
|
const customerParams = {
|
|
@@ -306,13 +306,11 @@ export default {
|
|
|
confirmButtonText: '确定'
|
|
|
})
|
|
|
for (let i = 0; i < result.data.length; i++) {
|
|
|
- result.data[i].customerNumber = result.data[i].number
|
|
|
+ result.data[i].customerNumber = result.data[i].number
|
|
|
result.data[i].customerName = result.data[i].name
|
|
|
}
|
|
|
if (this.custoList.length) {
|
|
|
-
|
|
|
this.custoList = [...this.custoList, ...this.resArr(this.custoList, result.data)]
|
|
|
-
|
|
|
} else {
|
|
|
this.custoList = result.data
|
|
|
}
|
|
@@ -339,39 +337,23 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
getCond() {
|
|
|
+ console.log(this.code , 'hhjkhkj',this.comCode,'999999')
|
|
|
this.listLoading = true
|
|
|
const custoParams = {
|
|
|
pageNum: this.currentPages,
|
|
|
pageSize: this.pageSizes,
|
|
|
- policyId: this.comCode
|
|
|
+ policyId: this.comCode || this.code
|
|
|
}
|
|
|
getCustomerList(custoParams).then((res) => {
|
|
|
this.custoList = res.data.records
|
|
|
- console.log(this.custoList,'已选的')
|
|
|
+ console.log(this.custoList, '已选的')
|
|
|
this.clistTotals = res.data.total
|
|
|
this.listLoading = false
|
|
|
// this.getCrList()
|
|
|
})
|
|
|
},
|
|
|
- handleSubmit() {
|
|
|
- toExamine({
|
|
|
- examineStatus: this.examineStatus,
|
|
|
- policyId: this.$parent.id,
|
|
|
- examineRemark: this.remark
|
|
|
- }).then((res) => {
|
|
|
- this.$successMsg('已提交审核')
|
|
|
- this.$parent.isShow = 1
|
|
|
- this.$parent.getList()
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
handleCondition(id, index) {
|
|
|
deleteCondition({ id }).then((res) => {
|
|
|
- // this.conditionList.splice(index, 1);
|
|
|
- // Object.assign(
|
|
|
- // this.$children[9].$data,
|
|
|
- // this.$children[9].$options.data()
|
|
|
- // );
|
|
|
this.getConditionList()
|
|
|
this.$successMsg('删除成功')
|
|
|
})
|
|
@@ -389,7 +371,6 @@ export default {
|
|
|
const params = { policyMaterialId: id }
|
|
|
deleteMaterialPolicy(params).then((res) => {
|
|
|
this.$successMsg('删除成功')
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
@@ -487,12 +468,10 @@ export default {
|
|
|
this.$set(this.dataL[i], 'disabled', false)
|
|
|
// this.dataL[i].disabled = false
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
const arr = this.resArr(this.custoList, this.rightData)
|
|
|
this.custoList = arr
|
|
|
-
|
|
|
} else {
|
|
|
this.$errorMsg('请选择要删除的经销商')
|
|
|
}
|
|
@@ -504,7 +483,7 @@ export default {
|
|
|
// 提交数据
|
|
|
|
|
|
async handleSave() {
|
|
|
- this.$emit('handlEditPolicy', this.custoList)
|
|
|
+ this.$emit('handlEditPolicy', this.custoList)
|
|
|
},
|
|
|
handleReset() {
|
|
|
this.dataR = this.rightData = []
|