fengyuan_yang 4 weeks ago
parent
commit
2d8b140982
  1. 12
      cclqms-vue/src/views/modules/common/Chooselist.vue
  2. 3
      cclqms-vue/src/views/modules/mrb/mrbRecord.vue

12
cclqms-vue/src/views/modules/common/Chooselist.vue

@ -82,7 +82,7 @@ export default {
param3: '',
param: '',
conSql: '',
param4: this.$store.state.user.site,
param4: '',
dataList: [],
baseListData: {
caption1: '',
@ -103,11 +103,12 @@ export default {
methods: {
//
init(tagNo,param,conSql) {
init(tagNo,param,conSql,siteValue) {
this.tagNo = tagNo
this.visible = true;
this.param = param != null && param !== undefined ? String(param) : ''
this.conSql = conSql?conSql: ''
this.param4 = siteValue != null && siteValue !== undefined ? String(siteValue).trim() : String(this.$store.state.user.site || '').trim()
// tagNo
getChooselist({"tagNo": tagNo}).then(({data}) => {
this.columnList = []
@ -185,7 +186,7 @@ export default {
if (this.tagNo <1000 && this.tagNo !== 93){
console.log(this.tagNo)
if (this.param4) {
sql = this.appendCondition(sql, "site=" + this.param4)
sql = this.appendCondition(sql, "site='" + this.escapeSqlLiteral(this.param4) + "'")
}
}
if (this.conSql && this.conSql.trim() !== '') {
@ -321,6 +322,9 @@ export default {
: (mainSql + " where " + condition)
return orderSql ? (result + " " + orderSql) : result
},
escapeSqlLiteral(value) {
return String(value || '').replace(/'/g, "''")
},
getRowData(row) {
this.visible = false
this.$emit('getBaseData',row)
@ -331,7 +335,7 @@ export default {
this.param2=''
this.param3= ''
this.param= ''
this.param4=this.$store.state.user.site
this.param4=''
}
}
}

3
cclqms-vue/src/views/modules/mrb/mrbRecord.vue

@ -3229,6 +3229,7 @@ export default {
this.$nextTick(() => {
let strVal = ''
let conSql = ''
const chooseSite = this.resolveFormSite()
if (type === CHOOSE_TYPE_MATERIAL_PN) {
strVal = this.formData.materialPn
} else if (type === CHOOSE_TYPE_SUPPLIER_NO) {
@ -3252,7 +3253,7 @@ export default {
strVal = this.tempCountersignItemRow && this.tempCountersignItemRow.executor
conSql = this.getChooseListSiteSql('b.site')
}
this.$refs.baseList.init(tagNo, strVal || '', conSql || '')
this.$refs.baseList.init(tagNo, strVal || '', conSql || '', chooseSite)
})
},
getBaseData (val) {

Loading…
Cancel
Save