|
@@ -122,6 +122,8 @@
|
|
<el-tab-pane label="项目设备" name="1"></el-tab-pane>
|
|
<el-tab-pane label="项目设备" name="1"></el-tab-pane>
|
|
<el-tab-pane label="项目人员" name="2"></el-tab-pane>
|
|
<el-tab-pane label="项目人员" name="2"></el-tab-pane>
|
|
<el-tab-pane label="服务网点" name="3"></el-tab-pane>
|
|
<el-tab-pane label="服务网点" name="3"></el-tab-pane>
|
|
|
|
+ <el-tab-pane label="辅材配置" name="4"></el-tab-pane>
|
|
|
|
+ <el-tab-pane label="配件配置" name="5"></el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
<el-button size="small" v-if="formType!=2" type="primary" @click="add()">新增</el-button>
|
|
<el-button size="small" v-if="formType!=2" type="primary" @click="add()">新增</el-button>
|
|
<div class="table">
|
|
<div class="table">
|
|
@@ -332,6 +334,170 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
+ <!-- 辅材配置 -->
|
|
|
|
+ <el-form ref="formData4" :model="formData4">
|
|
|
|
+ <el-table v-show="typeIndex == 4" :data="formData4.itemList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
|
+ <el-table-column label="大类" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.parentCategoryName}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="小类" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.goodsCategoryName}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="*辅材名称" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item :prop="'itemList.' + scope.$index + '.auxiliary'" :rules="[{ required: true, message: `请选择辅材名称`, trigger: 'blur' }]">
|
|
|
|
+ <el-select v-model="scope.row.auxiliary" @change="(e)=>{
|
|
|
|
+ scope.row.goodsId = e.normId
|
|
|
|
+ scope.row.goodsName = e.normName
|
|
|
|
+ scope.row.goodsCategoryName = e.categoryName
|
|
|
|
+ scope.row.goodsCategoryId = e.categoryId
|
|
|
|
+ scope.row.parentCategoryName = e.parentCategoryName
|
|
|
|
+ scope.row.parentCategoryId = e.parentCategoryId
|
|
|
|
+ scope.row.goodsCode = e.normCode
|
|
|
|
+ scope.row.goodsSpecification = e.specification
|
|
|
|
+ scope.row.goodsStockUnit = e.unit
|
|
|
|
+ scope.row.normType = e.normType
|
|
|
|
+ scope.row.normAmount = e.normAmount
|
|
|
|
+ }" :disabled="isEdit4 != scope.$index || formType == 2" value-key="normId" placeholder="请选择" style="width: 100%;">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item,ind) in auxiliaryList"
|
|
|
|
+ :key="ind"
|
|
|
|
+ :label="item.normName"
|
|
|
|
+ :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="商品代码">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.goodsCode}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="规格型号">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.goodsSpecification}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="单位">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.goodsStockUnit}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="收费类型" >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.normType == 'M'?'配件物料':scope.row.normType == 'S'?'服务收费':''}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="*收费标准(元)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item :prop="'itemList.' + scope.$index + '.normAmount'"
|
|
|
|
+ :rules="[{ required: true, message: `请输入收费标准`, trigger: 'blur' }]">
|
|
|
|
+ <el-input type="number" oninput="if(value < 0) value=0" v-model="scope.row.normAmount" :disabled="isEdit4 != scope.$index || formType == 2" placeholder="请输入"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="right" width="140">
|
|
|
|
+ <template slot-scope="scope" v-if="formType != 2">
|
|
|
|
+ <el-button size="mini" type="primary" v-if="scope.$index != isEdit4" @click="edit(4,scope.$index)">编辑</el-button>
|
|
|
|
+ <el-button size="mini" type="danger" @click="del(scope.$index)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-form>
|
|
|
|
+ <!-- 配件配置 -->
|
|
|
|
+ <el-form ref="formData5" :model="formData5">
|
|
|
|
+ <el-table v-show="typeIndex == 5" :data="formData5.itemList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
|
+ <el-table-column label="*配件名称" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item :prop="'itemList.' + scope.$index + '.attachment'" :rules="[{ required: true, message: `请选择辅材名称`, trigger: 'blur' }]">
|
|
|
|
+ <el-select v-model="scope.row.attachment" @change="(e)=>{
|
|
|
|
+ scope.row.goodsId = e.goodsId
|
|
|
|
+ scope.row.goodsName = e.goodsName
|
|
|
|
+ scope.row.goodsCode = e.goodsCode
|
|
|
|
+ scope.row.goodsStockUnit = e.goodsStockUnit
|
|
|
|
+ scope.row.normType = e.normType
|
|
|
|
+ scope.row.normAmount = e.normAmount
|
|
|
|
+ scope.row.brandRelaName = e.brandRelaName
|
|
|
|
+ scope.row.productRelaName = e.productRelaName
|
|
|
|
+ }" :disabled="isEdit5 != scope.$index || formType == 2" value-key="goodsId" placeholder="请选择" style="width: 100%;">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item,ind) in attachmentList"
|
|
|
|
+ :key="ind"
|
|
|
|
+ :label="item.goodsName"
|
|
|
|
+ :value="item">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="单位">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.goodsStockUnit}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="商品代码">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.goodsCode}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="收费类型" >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.normType == 'M'?'配件物料':scope.row.normType == 'S'?'服务收费':''}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="适用品牌">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.brandRelaName}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="适用产品大类">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ {{scope.row.productRelaName}}
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="" align="center" label="*收费标准(元)">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item :prop="'itemList.' + scope.$index + '.normAmount'"
|
|
|
|
+ :rules="[{ required: true, message: `请输入收费标准`, trigger: 'blur' }]">
|
|
|
|
+ <el-input type="number" oninput="if(value < 0) value=0" v-model="scope.row.normAmount" :disabled="isEdit5 != scope.$index || formType == 2" placeholder="请输入"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="right" width="140">
|
|
|
|
+ <template slot-scope="scope" v-if="formType != 2">
|
|
|
|
+ <el-button size="mini" type="primary" v-if="scope.$index != isEdit5" @click="edit(5,scope.$index)">编辑</el-button>
|
|
|
|
+ <el-button size="mini" type="danger" @click="del(scope.$index)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-form>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-card>
|
|
<div class="page-footer">
|
|
<div class="page-footer">
|
|
@@ -366,7 +532,7 @@
|
|
import geographicalPosi from '@/components/geographicalPosi/index.vue'
|
|
import geographicalPosi from '@/components/geographicalPosi/index.vue'
|
|
import { getMainList } from "@/api/workOrder/settlementStandardInstall";
|
|
import { getMainList } from "@/api/workOrder/settlementStandardInstall";
|
|
import { getBrand } from '@/api/goods'
|
|
import { getBrand } from '@/api/goods'
|
|
- import { getDetail, save } from "@/api/engineeringMaintenance/basicData";
|
|
|
|
|
|
+ import { getDetail, getAuxiliaryList, getAttachmentList, save } from "@/api/engineeringMaintenance/basicData";
|
|
import request from '@/utils/request'
|
|
import request from '@/utils/request'
|
|
export default {
|
|
export default {
|
|
components: {geographicalPosi},
|
|
components: {geographicalPosi},
|
|
@@ -375,6 +541,8 @@
|
|
return {
|
|
return {
|
|
tabIndex: 1,
|
|
tabIndex: 1,
|
|
typeIndex: '1',
|
|
typeIndex: '1',
|
|
|
|
+ auxiliaryList: [],
|
|
|
|
+ attachmentList: [],
|
|
orderTypeList: [],
|
|
orderTypeList: [],
|
|
websitData: [],
|
|
websitData: [],
|
|
brandList: [],
|
|
brandList: [],
|
|
@@ -417,9 +585,17 @@
|
|
formData3: {
|
|
formData3: {
|
|
websitList: [],
|
|
websitList: [],
|
|
},
|
|
},
|
|
|
|
+ formData4: {
|
|
|
|
+ itemList: [],
|
|
|
|
+ },
|
|
|
|
+ formData5: {
|
|
|
|
+ itemList: [],
|
|
|
|
+ },
|
|
isEdit1: 0,
|
|
isEdit1: 0,
|
|
isEdit2: 0,
|
|
isEdit2: 0,
|
|
isEdit3: 0,
|
|
isEdit3: 0,
|
|
|
|
+ isEdit4: 0,
|
|
|
|
+ isEdit5: 0,
|
|
companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
rules: {
|
|
rules: {
|
|
projectName: [
|
|
projectName: [
|
|
@@ -455,6 +631,8 @@
|
|
rules1: {},
|
|
rules1: {},
|
|
rules2: {},
|
|
rules2: {},
|
|
rules3: {},
|
|
rules3: {},
|
|
|
|
+ rules4: {},
|
|
|
|
+ rules5: {},
|
|
isSave: true
|
|
isSave: true
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -509,7 +687,15 @@
|
|
})
|
|
})
|
|
this.formData2.byList = res.data.byList
|
|
this.formData2.byList = res.data.byList
|
|
this.formData3.websitList = res.data.websitList
|
|
this.formData3.websitList = res.data.websitList
|
|
-
|
|
|
|
|
|
+ res.data.itemList.map(item=>{
|
|
|
|
+ if(item.goodsType == 'M'){
|
|
|
|
+ item.auxiliary = {normId: item.goodsId}
|
|
|
|
+ this.formData4.itemList.push(item)
|
|
|
|
+ }else{
|
|
|
|
+ item.attachment = {goodsId: item.goodsId}
|
|
|
|
+ this.formData5.itemList.push(item)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
console.log(this.formData1.productList,'123123123')
|
|
console.log(this.formData1.productList,'123123123')
|
|
})
|
|
})
|
|
@@ -519,6 +705,8 @@
|
|
this.getBrandList()
|
|
this.getBrandList()
|
|
this.getWebsit()
|
|
this.getWebsit()
|
|
this.getMainList()
|
|
this.getMainList()
|
|
|
|
+ this.getAuxiliaryList()
|
|
|
|
+ this.getAttachmentList()
|
|
this.getinitlbslist()
|
|
this.getinitlbslist()
|
|
},
|
|
},
|
|
getOrderType(){
|
|
getOrderType(){
|
|
@@ -546,6 +734,24 @@
|
|
this.mainList = res.data
|
|
this.mainList = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getAuxiliaryList(){
|
|
|
|
+ getAuxiliaryList({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ params: []
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.auxiliaryList = res.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getAttachmentList(){
|
|
|
|
+ getAttachmentList({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ params: [{param: "a.norm_type", compare: "=", value: "M"}]
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.attachmentList = res.data.records
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getinitlbslist() {
|
|
getinitlbslist() {
|
|
// 初始化请求省市区街道下拉选项数据
|
|
// 初始化请求省市区街道下拉选项数据
|
|
lbsAmapRegion({ pid: 0 }).then(res => {
|
|
lbsAmapRegion({ pid: 0 }).then(res => {
|
|
@@ -657,7 +863,7 @@
|
|
},
|
|
},
|
|
add(){
|
|
add(){
|
|
if(!this.preserveRuleForm('formData' + this.typeIndex)){return false}
|
|
if(!this.preserveRuleForm('formData' + this.typeIndex)){return false}
|
|
- let name = this.typeIndex == 1?'productList':this.typeIndex == 2?'byList':'websitList'
|
|
|
|
|
|
+ let name = this.typeIndex == 1?'productList':this.typeIndex == 2?'byList':this.typeIndex == 3?'websitList':'itemList'
|
|
this['isEdit' + this.typeIndex] = 0
|
|
this['isEdit' + this.typeIndex] = 0
|
|
// if(this['formData' + this.typeIndex][name].length != 0){this['isEdit' + this.typeIndex] += 1}
|
|
// if(this['formData' + this.typeIndex][name].length != 0){this['isEdit' + this.typeIndex] += 1}
|
|
if(this.typeIndex == 1){
|
|
if(this.typeIndex == 1){
|
|
@@ -684,7 +890,7 @@
|
|
mobile: '',
|
|
mobile: '',
|
|
feeExamine: ''
|
|
feeExamine: ''
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ }else if(this.typeIndex == 3){
|
|
this['formData' + this.typeIndex][name].unshift({
|
|
this['formData' + this.typeIndex][name].unshift({
|
|
websit: null,
|
|
websit: null,
|
|
websitId: '',
|
|
websitId: '',
|
|
@@ -693,6 +899,35 @@
|
|
mobile: '',
|
|
mobile: '',
|
|
address: ''
|
|
address: ''
|
|
})
|
|
})
|
|
|
|
+ }else if(this.typeIndex == 4){
|
|
|
|
+ this['formData' + this.typeIndex][name].unshift({
|
|
|
|
+ auxiliary: null,
|
|
|
|
+ goodsId: '',
|
|
|
|
+ goodsName: '',
|
|
|
|
+ parentCategoryId: '',
|
|
|
|
+ parentCategoryName: '',
|
|
|
|
+ goodsCategoryId: '',
|
|
|
|
+ goodsCategoryName: '',
|
|
|
|
+ goodsCode: '',
|
|
|
|
+ goodsSpecification: '',
|
|
|
|
+ goodsStockUnit: '',
|
|
|
|
+ normType: '',
|
|
|
|
+ normAmount: '',
|
|
|
|
+ goodsType: 'M'
|
|
|
|
+ })
|
|
|
|
+ }else if(this.typeIndex == 5){
|
|
|
|
+ this['formData' + this.typeIndex][name].unshift({
|
|
|
|
+ attachment: null,
|
|
|
|
+ goodsId: '',
|
|
|
|
+ goodsName: '',
|
|
|
|
+ goodsCode: '',
|
|
|
|
+ goodsStockUnit: '',
|
|
|
|
+ normType: '',
|
|
|
|
+ normAmount: '',
|
|
|
|
+ brandRelaName: '',
|
|
|
|
+ productRelaName: '',
|
|
|
|
+ goodsType: 'P'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
del(index){
|
|
del(index){
|
|
@@ -715,6 +950,14 @@
|
|
that.typeIndex = '3'
|
|
that.typeIndex = '3'
|
|
return that.$message.error('请添加服务网点信息');
|
|
return that.$message.error('请添加服务网点信息');
|
|
}
|
|
}
|
|
|
|
+ if(that.formData4.itemList.length == 0){
|
|
|
|
+ that.typeIndex = '4'
|
|
|
|
+ return that.$message.error('请添加辅材配置信息');
|
|
|
|
+ }
|
|
|
|
+ if(that.formData5.itemList.length == 0){
|
|
|
|
+ that.typeIndex = '5'
|
|
|
|
+ return that.$message.error('请添加配件配置信息');
|
|
|
|
+ }
|
|
if(!that.preserveRuleForm('formData1')){
|
|
if(!that.preserveRuleForm('formData1')){
|
|
return that.typeIndex = '1'
|
|
return that.typeIndex = '1'
|
|
}
|
|
}
|
|
@@ -724,6 +967,12 @@
|
|
if(!that.preserveRuleForm('formData3')){
|
|
if(!that.preserveRuleForm('formData3')){
|
|
return that.typeIndex = '3'
|
|
return that.typeIndex = '3'
|
|
}
|
|
}
|
|
|
|
+ if(!that.preserveRuleForm('formData4')){
|
|
|
|
+ return that.typeIndex = '4'
|
|
|
|
+ }
|
|
|
|
+ if(!that.preserveRuleForm('formData5')){
|
|
|
|
+ return that.typeIndex = '5'
|
|
|
|
+ }
|
|
this.save()
|
|
this.save()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -747,7 +996,8 @@
|
|
byList: this.formData2.byList,
|
|
byList: this.formData2.byList,
|
|
productList: this.formData1.productList,
|
|
productList: this.formData1.productList,
|
|
websitList: this.formData3.websitList,
|
|
websitList: this.formData3.websitList,
|
|
- typeList: data
|
|
|
|
|
|
+ typeList: data,
|
|
|
|
+ itemList: [...this.formData4.itemList,...this.formData5.itemList]
|
|
}
|
|
}
|
|
save(params).then(res => {
|
|
save(params).then(res => {
|
|
that.$message.success('保存成功!')
|
|
that.$message.success('保存成功!')
|