|
|
@ -31,9 +31,15 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-form-item> |
|
|
|
|
|
<span slot="label" style="" @click="getBaseList(93)"><a herf="#">{{buttons.site||'工厂'}}</a></span> |
|
|
|
|
|
<el-input v-model="dataForm.site" style="width: 150px;" placeholder="工厂"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item :label="buttons.site||'工厂'"> |
|
|
|
|
|
<el-select v-model="dataForm.site" filterable clearable placeholder="请选择工厂" style="width: 150px;"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="i in siteOptions" |
|
|
|
|
|
:key="i.siteid" |
|
|
|
|
|
:label="i.sitename" |
|
|
|
|
|
:value="i.siteid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="车间"> |
|
|
<el-form-item label="车间"> |
|
|
<el-select v-model="dataForm.workShopId" placeholder="请选择" style="width: 150px;" clearable> |
|
|
<el-select v-model="dataForm.workShopId" placeholder="请选择" style="width: 150px;" clearable> |
|
|
@ -83,7 +89,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import {getEamWorkShop} from "@/api/factory/site.js"; |
|
|
|
|
|
|
|
|
import {getEamWorkShop, getSite2} from "@/api/factory/site.js"; |
|
|
import {searchSysLanguage} from "@/api/sysLanguage.js" |
|
|
import {searchSysLanguage} from "@/api/sysLanguage.js" |
|
|
import { |
|
|
import { |
|
|
searchFunctionButtonList, |
|
|
searchFunctionButtonList, |
|
|
@ -133,6 +139,7 @@ export default { |
|
|
language: '语言', |
|
|
language: '语言', |
|
|
}, |
|
|
}, |
|
|
workShopList:[], |
|
|
workShopList:[], |
|
|
|
|
|
siteOptions: [], |
|
|
showSupplierPicker: false, |
|
|
showSupplierPicker: false, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -164,9 +171,6 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getBaseData(val){ |
|
|
getBaseData(val){ |
|
|
if (this.tagNo === 93){ |
|
|
|
|
|
this.dataForm.site = val.SiteID |
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 1100){ |
|
|
if (this.tagNo === 1100){ |
|
|
this.dataForm.supplierNo = val.supplier_no |
|
|
this.dataForm.supplierNo = val.supplier_no |
|
|
} |
|
|
} |
|
|
@ -177,9 +181,6 @@ export default { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
let strVal = ""; |
|
|
let strVal = ""; |
|
|
let conSql = ""; |
|
|
let conSql = ""; |
|
|
if (val === 93){ |
|
|
|
|
|
strVal = this.dataForm.site |
|
|
|
|
|
} |
|
|
|
|
|
if (val === 1100) { |
|
|
if (val === 1100) { |
|
|
if (!this.dataForm.site) { |
|
|
if (!this.dataForm.site) { |
|
|
this.$message.warning('请先选择工厂') |
|
|
this.$message.warning('请先选择工厂') |
|
|
@ -191,6 +192,25 @@ export default { |
|
|
this.$refs.baseList.init(val,strVal,conSql) |
|
|
this.$refs.baseList.init(val,strVal,conSql) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 加载工厂下拉(site表) - rqrq |
|
|
|
|
|
loadSiteOptions () { |
|
|
|
|
|
let inData = { |
|
|
|
|
|
username: this.$store.state.user.name, |
|
|
|
|
|
siteid: '', |
|
|
|
|
|
sitename: '' |
|
|
|
|
|
} |
|
|
|
|
|
getSite2(inData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.siteOptions = data.rows || [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.siteOptions = [] |
|
|
|
|
|
this.$message.error((data && data.msg) || '加载工厂失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.siteOptions = [] |
|
|
|
|
|
this.$message.error('加载工厂失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 获取多语言列表 |
|
|
// 获取多语言列表 |
|
|
getLanguageList() { |
|
|
getLanguageList() { |
|
|
let queryLanguage = { languageCode: this.$i18n.locale} |
|
|
let queryLanguage = { languageCode: this.$i18n.locale} |
|
|
@ -201,7 +221,7 @@ export default { |
|
|
|
|
|
|
|
|
init(id) { |
|
|
init(id) { |
|
|
this.dataForm.id = id || 0 |
|
|
this.dataForm.id = id || 0 |
|
|
// this.factoryList(); |
|
|
|
|
|
|
|
|
this.loadSiteOptions() |
|
|
this.getLanguageList(); |
|
|
this.getLanguageList(); |
|
|
this.$http({ |
|
|
this.$http({ |
|
|
url: this.$http.adornUrl('/sys/role/select'), |
|
|
url: this.$http.adornUrl('/sys/role/select'), |
|
|
@ -229,7 +249,7 @@ export default { |
|
|
this.dataForm.roleIdList = data.user.roleIdList |
|
|
this.dataForm.roleIdList = data.user.roleIdList |
|
|
this.dataForm.status = data.user.status |
|
|
this.dataForm.status = data.user.status |
|
|
this.dataForm.languageDefault = data.user.languageDefault |
|
|
this.dataForm.languageDefault = data.user.languageDefault |
|
|
this.dataForm.site = data.user.site.toString() |
|
|
|
|
|
|
|
|
this.dataForm.site = data.user.site == null ? '' : data.user.site.toString() |
|
|
this.dataForm.userDisplay = data.user.userDisplay |
|
|
this.dataForm.userDisplay = data.user.userDisplay |
|
|
this.dataForm.workShopId = data.user.workShopId |
|
|
this.dataForm.workShopId = data.user.workShopId |
|
|
this.dataForm.supplierNo = data.user.supplierNo |
|
|
this.dataForm.supplierNo = data.user.supplierNo |
|
|
@ -245,6 +265,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 表单提交 |
|
|
// 表单提交 |
|
|
dataFormSubmit() { |
|
|
dataFormSubmit() { |
|
|
|
|
|
if (!this.dataForm.site) { |
|
|
|
|
|
this.$message.warning('请选择工厂') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (this.showSupplierPicker && !this.dataForm.supplierNo) { |
|
|
if (this.showSupplierPicker && !this.dataForm.supplierNo) { |
|
|
this.$message.warning('请选择供应商') |
|
|
this.$message.warning('请选择供应商') |
|
|
return |
|
|
return |
|
|
|