|
|
@@ -5,7 +5,7 @@
|
|
|
<el-breadcrumb-item :to="{ path: '/oilsupplier/supplierappend/goodslist' }">物资类列表</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>编辑</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
- <el-card class="box-card">
|
|
|
+ <el-card class="box-card" v-loading="cardloading">
|
|
|
<div slot="header">
|
|
|
<span>
|
|
|
<i class="icon icon-table2"></i> 编辑
|
|
|
@@ -147,8 +147,8 @@
|
|
|
<el-table-column
|
|
|
label="是否为制造商" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" @click="type_change(scope)">非制造商</el-button>
|
|
|
- <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" @click="type_change(scope)">制造商</el-button>
|
|
|
+ <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" :disabled="isDisabledBtn()" @click="type_change(scope)">非制造商</el-button>
|
|
|
+ <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" :disabled="isDisabledBtn()" @click="type_change(scope)">制造商</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
|
|
|
@@ -287,11 +287,13 @@
|
|
|
v-loading="loading"
|
|
|
title="物资类业务列表"
|
|
|
:visible.sync="goodsDialog"
|
|
|
+ @open="opendialogadd"
|
|
|
top="5vh">
|
|
|
<el-tabs v-model="tabIdx"
|
|
|
style="margin-top: -30px;">
|
|
|
<el-tab-pane label="准入编码"
|
|
|
name="1">
|
|
|
+ {{loading}}
|
|
|
<el-form label-width="150px" v-loading="dialogloading" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData" style="padding-top: 15px">
|
|
|
<el-row style="margin-top: -10px">
|
|
|
<el-col :span="12">
|
|
|
@@ -588,6 +590,9 @@
|
|
|
}
|
|
|
return {
|
|
|
// 456
|
|
|
+ Grade: '',
|
|
|
+ OperType: '',
|
|
|
+ cardloading: '',
|
|
|
Remark: '',
|
|
|
Remark1: '',
|
|
|
loading: false,
|
|
|
@@ -622,6 +627,7 @@
|
|
|
ComAuditdialogShow: false,
|
|
|
organizeOption: [], // 审批部门
|
|
|
auditerOption: [], // 审批人
|
|
|
+ SupplierformData: {},
|
|
|
orgtreeprops: {
|
|
|
value: 'Id',
|
|
|
label: 'CodeName',
|
|
|
@@ -794,7 +800,10 @@
|
|
|
Id: '', // 传的参数
|
|
|
editFlag: '', // 编辑操作标记
|
|
|
waituploads: [], // 等待上传的附件列表
|
|
|
- IsCompanyUser: ''
|
|
|
+ IsCompanyUser: '',
|
|
|
+ isFirstOpen: true,
|
|
|
+ node_had: {},
|
|
|
+ resolve_had: {}
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
@@ -814,6 +823,19 @@
|
|
|
this.initData2019()
|
|
|
},
|
|
|
methods: {
|
|
|
+ isDisabledBtn () {
|
|
|
+ if (this.OperType !== '制造商') {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ opendialogadd () {
|
|
|
+ if (!this.isFirstOpen) {
|
|
|
+ this.node_had.childNodes = []
|
|
|
+ this.getChildrens(this.node_had, this.resolve_had)
|
|
|
+ }
|
|
|
+ },
|
|
|
addSortData1 () {
|
|
|
this.goodsDialog = true
|
|
|
},
|
|
|
@@ -956,13 +978,22 @@
|
|
|
|
|
|
// 获取下一级所有分类
|
|
|
getChildrens (val, resolve) {
|
|
|
+ if (this.isFirstOpen) {
|
|
|
+ this.node_had = val
|
|
|
+ this.resolve_had = resolve
|
|
|
+ this.isFirstOpen = false
|
|
|
+ }
|
|
|
+
|
|
|
let Id = 0
|
|
|
if (val.level === 0) {
|
|
|
Id = 0
|
|
|
} else {
|
|
|
Id = val.data.Id
|
|
|
}
|
|
|
- this.$axios.get('goodsaptitude/goodschildlistbypid/' + Id, {})
|
|
|
+ let params = {
|
|
|
+ GoodsLevel: this.Grade
|
|
|
+ }
|
|
|
+ this.$axios.get('goodsaptitude/goodschildlistbypid/' + Id, {params})
|
|
|
.then(res => {
|
|
|
if (!res.data.items || res.data.items.length <= 0) {
|
|
|
val.isLeaf = true
|
|
|
@@ -1116,6 +1147,18 @@
|
|
|
_this.supplierOptions = _this.formData.SupplierId.toString()
|
|
|
_this.getSortList()
|
|
|
_this.getMySortList()
|
|
|
+ _this.getSupplier()
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getSupplier () {
|
|
|
+ suppapi.getEntity(this.formData.SupplierId, this.$axios).then(res => {
|
|
|
+ this.SupplierformData = res.data
|
|
|
+ if (this.SupplierformData) {
|
|
|
+ this.Grade = this.SupplierformData.Grade
|
|
|
+ this.OperType = this.SupplierformData.OperType
|
|
|
+ }
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
@@ -1401,7 +1444,7 @@
|
|
|
}
|
|
|
|
|
|
// 访问接口
|
|
|
- api.getList(params, this.$axios).then(res => {
|
|
|
+ api.getListInandApp(params, this.$axios).then(res => {
|
|
|
this.entityList = res.data.item
|
|
|
// this.currentItemCount = res.data.currentItemCount
|
|
|
}).catch(err => {
|
|
|
@@ -1574,8 +1617,9 @@
|
|
|
|
|
|
// 添加增项分类信息
|
|
|
addSortAppend () {
|
|
|
- let _this = this
|
|
|
- _this.loading = true
|
|
|
+ // debugger
|
|
|
+ // let _this = this
|
|
|
+ this.loading = true
|
|
|
let params = {
|
|
|
SupplierId: parseInt(this.formData.SupplierId),
|
|
|
SupplierCertId: parseInt(this.formData.SupplierCertId),
|
|
|
@@ -1585,50 +1629,50 @@
|
|
|
Remark: this.dialogFormData.Remark,
|
|
|
Type: '2'
|
|
|
}
|
|
|
- if (_this.checkList.length > 0) {
|
|
|
+ if (this.checkList.length > 0) {
|
|
|
params = Object.assign(params, {
|
|
|
- CheckList: _this.checkList
|
|
|
+ CheckList: this.checkList
|
|
|
})
|
|
|
} else {
|
|
|
- _this.loading = false
|
|
|
- _this.$message({
|
|
|
+ this.loading = false
|
|
|
+ this.$message({
|
|
|
type: 'warning',
|
|
|
message: '名称不能为空,请选择分类!'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- _this.$axios.post('/suppliercertappendsub/addgoodsbus/', params)
|
|
|
+ this.$axios.post('/suppliercertappendsub/addgoodsbus/', params)
|
|
|
.then(res => {
|
|
|
- _this.dialogloading = false
|
|
|
- _this.loading = false
|
|
|
+ this.dialogloading = false
|
|
|
+ // _this.loading = false
|
|
|
if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
+ this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
// 关闭dialog
|
|
|
- _this.dialogVisible = false
|
|
|
+ this.dialogVisible = false
|
|
|
// 更新增项分类表
|
|
|
- _this.loading = false
|
|
|
- _this.getSortList()
|
|
|
- _this.getMySortList()
|
|
|
- _this.getFileList()
|
|
|
+ this.loading = false
|
|
|
+ this.getSortList()
|
|
|
+ this.getMySortList()
|
|
|
+ this.getFileList()
|
|
|
} else {
|
|
|
- _this.loading = false
|
|
|
- _this.$message({
|
|
|
+ this.loading = false
|
|
|
+ this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.loading = false
|
|
|
console.error(err)
|
|
|
})
|
|
|
this.$refs.orgmanagetree.setCheckedKeys([])
|
|
|
this.$refs.secmanagetree.setCheckedKeys([])
|
|
|
this.filterText = ''
|
|
|
this.searchText = ''
|
|
|
- _this.loading = false
|
|
|
},
|
|
|
|
|
|
// 删除增项分类信息
|