|
|
@@ -797,37 +797,92 @@
|
|
|
style="margin-top: -30px;">
|
|
|
<el-tab-pane label="准入编码"
|
|
|
name="1">
|
|
|
- <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">
|
|
|
- <el-input v-if="!switchstatus" v-model="filterText" placeholder="请输入名称或代码" size="mini"
|
|
|
- style="width: 250px;"></el-input>
|
|
|
- <el-input v-if="switchstatus" v-model="searchText" placeholder="请输入名称或代码" size="mini" style="width: 250px;">
|
|
|
- </el-input>
|
|
|
- <el-button style="float: right;" type="primary" size="mini" @click="getsectreelist()"
|
|
|
- :disabled="!switchstatus">查询</el-button>
|
|
|
- <el-switch v-model="switchstatus" size="mini"></el-switch>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20" style="height: calc(100vh - 450px); overflow: auto; margin-top:20px">
|
|
|
- <el-col :span="20">
|
|
|
- <el-tree v-show="!switchstatus" highlight-current :expand-on-click-node="true" node-key="CodeName"
|
|
|
- :data="orgtreelist" :props="orgtreeprops" ref="orgmanagetree" check-on-click-node show-checkbox lazy
|
|
|
- :load="getChildrens" :filter-node-method="filterNode">
|
|
|
- </el-tree>
|
|
|
- <el-tree v-show="switchstatus" ref="secmanagetree" :data="sectreelist" show-checkbox check-on-click-node
|
|
|
- node-key="CodeName" :props="sectreeprops">
|
|
|
- </el-tree>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-top: 30px">
|
|
|
- 备注信息:
|
|
|
- <el-col :span="24">
|
|
|
- <el-input type="textarea" :rows=3 v-model="dialogFormData.Remark" placeholder="请输入备注" style="width: 100%">
|
|
|
- </el-input>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-if="!switchstatus"
|
|
|
+ v-model="filterText"
|
|
|
+ placeholder="请输入名称或代码"
|
|
|
+ size="mini"
|
|
|
+ style="width: 250px;"></el-input>
|
|
|
+ <el-input v-if="switchstatus"
|
|
|
+ v-model="searchText"
|
|
|
+ placeholder="请输入名称或代码"
|
|
|
+ size="mini"
|
|
|
+ style="width: 250px;"></el-input>
|
|
|
+ <el-button style="float: right;"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="getsectreelist()"
|
|
|
+ :disabled="!switchstatus">查询</el-button>
|
|
|
+ <el-switch v-model="switchstatus"
|
|
|
+ size="mini"></el-switch>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-col :span="14">
|
|
|
+ <el-row :gutter="20" style="height: calc(100vh - 450px); overflow: auto; margin-top:20px">
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-tree v-show="!switchstatus"
|
|
|
+ highlight-current
|
|
|
+ :expand-on-click-node="true"
|
|
|
+ node-key="CodeName"
|
|
|
+ :data="orgtreelist"
|
|
|
+ :props="orgtreeprops"
|
|
|
+ ref="orgmanagetree"
|
|
|
+ check-on-click-node
|
|
|
+ show-checkbox
|
|
|
+ lazy
|
|
|
+ @check="checkLostCertTimeOut"
|
|
|
+ :load="getChildrens"
|
|
|
+ :filter-node-method="filterNode">
|
|
|
+ </el-tree>
|
|
|
+ <el-tree v-show="switchstatus"
|
|
|
+ ref="secmanagetree"
|
|
|
+ :data="sectreelist"
|
|
|
+ show-checkbox
|
|
|
+ check-on-click-node
|
|
|
+ @check="checkLostCertTimeOut"
|
|
|
+ node-key="CodeName"
|
|
|
+ :props="sectreeprops">
|
|
|
+ </el-tree>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 30px">
|
|
|
+ 备注信息:
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-input v-model="Remark"
|
|
|
+ type="textarea"
|
|
|
+ :rows=3
|
|
|
+ placeholder="请输入备注信息"></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-table
|
|
|
+ height="calc(100vh - 325px)"
|
|
|
+ row-class-name="warning-row"
|
|
|
+ highlight-current-row
|
|
|
+ :data="lostTableData"
|
|
|
+ border
|
|
|
+ size="mini"
|
|
|
+ style="width: 100%; margin-top:20px">
|
|
|
+ <el-table-column
|
|
|
+ prop="Code"
|
|
|
+ label="准入编码">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.Code + ' ' + scope.row.Name}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="CertFileName"
|
|
|
+ label="缺少资质">
|
|
|
+ <template slot="header" slot-scope="scope">
|
|
|
+ <span style="color: red">{{'缺少资质(' + (lostTableData ? lostTableData.length : 0) + ')'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<!--<span slot="footer" class="dialog-footer">-->
|
|
|
<!--<el-button size="mini" @click="cancelOption()">取 消</el-button>-->
|
|
|
<!--<el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>-->
|
|
|
@@ -894,19 +949,21 @@
|
|
|
|
|
|
<!--</el-tab-pane>-->
|
|
|
</el-tabs>
|
|
|
+ <!--<div slot="footer"-->
|
|
|
+ <!-- class="dialog-footer"-->
|
|
|
+ <!-- v-if="tabIdx==1">-->
|
|
|
+ <!-- <!–<el-button size="mini" @click="visible = false">取 消</el-button>–>-->
|
|
|
+ <!-- <el-button type="primary"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- @click="ensureOption()">确 定</el-button>-->
|
|
|
+ <!--</div>-->
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer"
|
|
|
v-if="tabIdx==1">
|
|
|
- <!--<el-button size="mini" @click="visible = false">取 消</el-button>-->
|
|
|
- <el-button type="primary"
|
|
|
- size="mini"
|
|
|
- @click="ensureOption()">确 定</el-button>
|
|
|
- </div>
|
|
|
- <div slot="footer"
|
|
|
- class="dialog-footer"
|
|
|
- v-if="tabIdx==2">
|
|
|
<el-button type="primary"
|
|
|
size="mini"
|
|
|
+ :loading="loading"
|
|
|
+ :disabled="lostTableData && lostTableData.length > 0"
|
|
|
@click="addBusiness1()">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -1265,7 +1322,6 @@
|
|
|
currentPageCert: 1, // 分页
|
|
|
keyword: '',
|
|
|
goodsList2019: [],
|
|
|
- sectionCert: [],
|
|
|
goodsDialog: false,
|
|
|
tableloading:false,
|
|
|
|
|
|
@@ -1761,7 +1817,8 @@
|
|
|
],
|
|
|
EffectDate:
|
|
|
[{ required: true, validator: effectDate, trigger: 'change' }]
|
|
|
- }
|
|
|
+ },
|
|
|
+ lostTableData: []
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
@@ -2042,54 +2099,105 @@
|
|
|
if (!value) return true
|
|
|
return data.CodeName.indexOf(value) !== -1
|
|
|
},
|
|
|
+ checkLostCertTimeOut () {
|
|
|
+ let _this = this
|
|
|
+ this.loading = true
|
|
|
+ setTimeout(function () {
|
|
|
+ _this.$nextTick(() => {
|
|
|
+ _this.checkLostCert()
|
|
|
+ })
|
|
|
+ }, 200)
|
|
|
+ },
|
|
|
+ checkLostCert () {
|
|
|
+ let _this = this
|
|
|
+ let params = {
|
|
|
+ SupplierId: parseInt(_this.SupplierId),
|
|
|
+ SupplierCertId: parseInt(_this.SupplierCertId),
|
|
|
+ SupplierTypeCode: '01',
|
|
|
+ Type: '1',
|
|
|
+ IsManufacturer: 2,
|
|
|
+ CertSubStatus: '-1',
|
|
|
+ Remark: _this.Remark
|
|
|
+ }
|
|
|
+
|
|
|
+ let val1 = this.$refs.orgmanagetree.getCheckedNodes()
|
|
|
+ let val2 = this.$refs.secmanagetree.getCheckedNodes()
|
|
|
+ _this.checkList = []
|
|
|
+ for (let i = 0; i < val1.length; i++) {
|
|
|
+ if (val1[i].Code.length == 8) {
|
|
|
+ _this.checkList.push(val1[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < val2.length; i++) {
|
|
|
+ if (val2[i].Code.length == 8) {
|
|
|
+ _this.checkList.push(val2[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (_this.checkList.length > 0) {
|
|
|
+ params = Object.assign(params, {
|
|
|
+ CheckList: _this.checkList
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.lostTableData = []
|
|
|
+ this.loading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ _this.$axios.post('/suppliercertsub/check-certsub-lost', params).then(res => {
|
|
|
+ _this.lostTableData = res.data
|
|
|
+ this.loading = false
|
|
|
+ }).catch(err => {
|
|
|
+ this.loading = false
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取分类级联Id
|
|
|
getCode (item) {
|
|
|
let sortFlagStr = item.toString()
|
|
|
this.dialogFormData.SortFlag = sortFlagStr
|
|
|
this.getCodeById(item[item.length - 1]) // 根据分类Id获取Code
|
|
|
},
|
|
|
- type_change(val){
|
|
|
- if (this.formData.Status <= 0 && this.formData.Status != -5) {
|
|
|
- if (val.row.IsManufacturer == 2){
|
|
|
- this.tableloading = true
|
|
|
- let IsManufacturer = 2
|
|
|
- this.$axios.get('suppliercertappendsub/updatemanufacturerappend/' + parseInt(val.row.Id) +'/'+parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '更改成功'
|
|
|
+ type_change (val) {
|
|
|
+ if (this.formData.Status <= 0 && this.formData.Status != -5) {
|
|
|
+ if (val.row.IsManufacturer == 2) {
|
|
|
+ this.tableloading = true
|
|
|
+ let IsManufacturer = 2
|
|
|
+ this.$axios.get('suppliercertappendsub/updatemanufacturerappend/' + parseInt(val.row.Id) + '/' + parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '更改成功'
|
|
|
+ })
|
|
|
+ this.getSortList()
|
|
|
+ this.getMySortList()
|
|
|
+ this.getsubfile()
|
|
|
+ this.tableloading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
- this.getSortList()
|
|
|
- this.getMySortList()
|
|
|
- this.getsubfile()
|
|
|
- this.tableloading = false
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- }else if (val.row.IsManufacturer == 1){//---------------转换供应商与非供应商
|
|
|
- this.tableloading = true
|
|
|
- let IsManufacturer = 1
|
|
|
- this.$axios.get('suppliercertappendsub/updatemanufacturerappend/' + parseInt(val.row.Id) +'/'+parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '更改成功'
|
|
|
+ } else if (val.row.IsManufacturer == 1) { // ---------------转换供应商与非供应商
|
|
|
+ this.tableloading = true
|
|
|
+ let IsManufacturer = 1
|
|
|
+ this.$axios.get('suppliercertappendsub/updatemanufacturerappend/' + parseInt(val.row.Id) + '/' + parseInt(val.row.SupplierId) + '/' + IsManufacturer + '', {}).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '更改成功'
|
|
|
+ })
|
|
|
+ this.getMySortList()
|
|
|
+ this.getSortList()
|
|
|
+ this.getsubfile()
|
|
|
+ this.tableloading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
- this.getMySortList()
|
|
|
- this.getSortList()
|
|
|
- this.getsubfile()
|
|
|
- this.tableloading = false
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- this.getSortList()
|
|
|
- },
|
|
|
+ this.getSortList()
|
|
|
+ },
|
|
|
getFirAuditerByDept () {
|
|
|
let deptid = this.authUser.Profile.DepartmentId
|
|
|
this.userOptions = []
|
|
|
@@ -3431,7 +3539,7 @@
|
|
|
|
|
|
// 123
|
|
|
addBusiness1 () {
|
|
|
- if (this.sectionCert.length <= 0) {
|
|
|
+ if (this.checkList.length <= 0) {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
message: '请选择准入类别'
|
|
|
@@ -3446,14 +3554,16 @@
|
|
|
Type: '2',
|
|
|
IsManufacturer: 2,
|
|
|
Remark: this.Remark1,
|
|
|
- CheckList: this.sectionCert
|
|
|
+ CheckList: this.checkList
|
|
|
}
|
|
|
- for (var i = 0; i < this.sectionCert.length; i++) {
|
|
|
- this.sectionCert[i].Id = this.sectionCert[i].Id + ''
|
|
|
+ for (var i = 0; i < this.checkList.length; i++) {
|
|
|
+ this.checkList[i].Id = this.checkList[i].Id + ''
|
|
|
}
|
|
|
this.loading = true
|
|
|
+ console.log('新增', params)
|
|
|
this.$axios.post('/suppliercertappendsub/addgoodsbus', params)
|
|
|
.then(res => {
|
|
|
+ console.log('结果', res)
|
|
|
if (res.data.code === 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
@@ -3461,7 +3571,7 @@
|
|
|
})
|
|
|
this.goodsDialog = false
|
|
|
this.loading = false
|
|
|
- this.sectionCert = []
|
|
|
+ this.checkList = []
|
|
|
this.Remark1 = ''
|
|
|
this.getSortList()
|
|
|
this.getMySortList()
|
|
|
@@ -3503,9 +3613,6 @@
|
|
|
handleCurrentChangeCert (value) {
|
|
|
this.currentPageCert = value
|
|
|
this.initData2019()
|
|
|
- },
|
|
|
- handleSelectionChangeCert (val) {
|
|
|
- this.sectionCert = val
|
|
|
}
|
|
|
|
|
|
}
|