-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 新增
+
+
+
+
+
- {{ scope.row[item.columnProp] }}
-
+
+ {{ scope.row[item.columnProp] === 'Y'? '启用' : '停用' }}
+
+
+ {{ scope.row[item.columnProp] }}
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ i.buDesc }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
保存
关闭
@@ -153,7 +141,9 @@ import {
deleteFanuc, // 检验方法删除
} from "@/api/fanucGroup/fanucGroup.js"
import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
+import BuSelect from "../../../components/selector/select/BuSelect.vue";
export default {
+ components: {BuSelect},
data () {
return {
// 是否收藏
@@ -166,7 +156,7 @@ export default {
exportList: [],
// 导出 end
searchData: {
- site: this.$store.state.user.site,
+ site: '',
buNo: '',
prodLineNo: '',
prodLineDesc: '',
@@ -177,6 +167,7 @@ export default {
updateDate: '',
remake: '',
status: '',
+ buId:'',
page: 1,
limit: 10,
},
@@ -191,13 +182,14 @@ export default {
modalData: {
site: this.$store.state.user.site,
bu: '',
+ buId: '',
buNo: '',
prodLineNo: '',
prodLineDesc: '',
active: '',
- createBy: this.$store.state.user.name,
+ createBy: '',
createDate: '',
- updateBy: this.$store.state.user.name,
+ updateBy: '',
updateDate: '',
remake: '',
status: ''
@@ -225,14 +217,14 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 501001,
- serialNumber: '501001TableBuNo',
+ serialNumber: '501001TableBuDesc',
tableId: "501001Table",
tableName: "BU",
columnWidth: 150,
- columnProp: 'buNo',
+ columnProp: 'buDesc',
headerAlign: 'center',
align: "left",
- columnLabel: 'Bu',
+ columnLabel: 'BU',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -458,49 +450,38 @@ export default {
handler: function (newV, oldV) {
this.modalData.prodLineNo = this.modalData.prodLineNo.toUpperCase()
}
+ },
+ 'modalData.buId'(newVal, oldVal){
+ let row = this.userBuList.find(item => item.id === newVal);
+ if (row){
+ this.modalData.bu = row.buNo
+ this.modalData.site = row.site
+ }
+ },
+ modalFlag(newVal, oldVal){
+ if (newVal === false){
+ this.modalData = {
+ site: '',
+ bu: '',
+ buId: '',
+ buNo: '',
+ prodLineNo: '',
+ prodLineDesc: '',
+ active: '',
+ remake: '',
+ status: ''
+ }
+ }
}
},
created () {
//页面在加载的时候就调用查询方法
- // 获取用户的 site 和 bu
- this.getSiteAndBuByUserName()
+ this.getDataList()
},
methods: {
- // 获取用户的bu
- getSiteAndBuByUserName () {
- let tempData = {
- username: this.$store.state.user.name,
- }
- getSiteAndBuByUserName(tempData).then(({data}) => {
- if (data.code === 0) {
- this.userBuList = data.rows
- }
- this.getDataList()
- })
- },
-
- // // 初始化组件的参数
- // init (currentRow) {
- // //初始化参数
- // this.pageData = JSON.parse(JSON.stringify(currentRow))
- // //打开页面
- // this.visible = true
- // //判断是否是新增
- // if (this.pageData.addFlag === 'Y') {
- // this.modalDisableFlag = false
- // this.pageData.bu = this.userBuList[0].buNo
- // } else {
- // this.pageData.bu = this.pageData.site + '_' + this.pageData.buNo
- // this.modalDisableFlag = true
- // }
- // //重置人员信息
- // this.pageData.username = this.userId
- // },
-
-
// 查询获取数据列表
getDataList () {
this.searchData.limit = this.pageSize
@@ -521,7 +502,6 @@ export default {
this.pageIndex = 1
this.getDataList()
},
-
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
@@ -530,42 +510,33 @@ export default {
// 新增按钮
addModal () {
- this.modalData = {
- flag: '1',
- site: this.$store.state.user.site,
- bu: this.userBuList[0].buNo,
- prodLineNo: '',
- prodLineDesc: '',
- active: '',
- createBy: '',
- createDate: '',
- updateBy: '',
- updateDate: '',
- remake: '',
- status: 'Y',
-
+ let params = {
+ username: this.$store.state.user.name,
}
- this.modalDisableFlag = false
- this.modalFlag = true
+ getSiteAndBuByUserName(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.userBuList = data.rows
+ if (this.userBuList.length > 0){
+ this.modalData.buId = this.userBuList[0].id
+ this.modalData.createBy = this.$store.state.user.name
+ this.modalData.status = 'Y'
+ }
+ this.modalDisableFlag = false
+ this.modalFlag = true
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
},
// 修改按钮
updateModal (row) {
this.modalData = {
+ ...row,
flag: '2',
- bu: row.site + '_' + row.buNo,
- id:row.id,
- site: row.site,
- creator: this.$store.state.user.name,
- buNo: row.buNo,
- prodLineNo: row.prodLineNo,
- active: row.active,
- prodLineDesc: row.prodLineDesc,
- createBy: row.createBy,
- createDate: row.createDate,
- updateBy: row.updateBy,
- remake: row.remake,
- status: row.status
+ updateBy: this.$store.state.user.name,
}
this.modalDisableFlag = true
this.modalFlag = true
@@ -607,7 +578,7 @@ export default {
this.$message.warning('请输入组名称!')
return
}
- if (this.modalData.flag === '1') { // 新增
+ if (this.modalData.id === undefined) { // 新增
saveFanuc(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@@ -795,3 +766,10 @@ export default {
}
}
+
+
diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue
index 85d4e91..8406359 100644
--- a/src/views/modules/quote/index.vue
+++ b/src/views/modules/quote/index.vue
@@ -777,7 +777,7 @@ export default {
this.saveQuote.customerNo = newVal.toUpperCase()
},
'saveQuote.projectNo'(newVal, oldVal){
- // this.saveQuote.projectNo = newVal.toUpperCase()
+ this.saveQuote.projectNo = newVal.toUpperCase()
},
saveVisible(newVal, oldVal){
if (newVal === false){
@@ -829,7 +829,7 @@ export default {
-
+