|
@@ -85,10 +85,11 @@ export default {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
return this.editIndex == index?(
|
|
return this.editIndex == index?(
|
|
<div class="redbordererr">
|
|
<div class="redbordererr">
|
|
- <el-form-item prop={`tableData.${index}.types`} rules={[{required: true, message: '工单类型不能为空', trigger: 'blur'}]}>
|
|
|
|
- <el-select value-key="orderSmallTypeText" value={row.types} placeholder="请选择"
|
|
|
|
|
|
+ <el-form-item prop={`tableData.${index}.type`} rules={[{required: true, message: '工单类型不能为空', trigger: 'blur'}]}>
|
|
|
|
+ <el-select value-key="id" value={{orderSmallTypeText:row.typeName,id: row.type}} placeholder="请选择"
|
|
onInput={(val)=>{
|
|
onInput={(val)=>{
|
|
- row.types=val
|
|
|
|
|
|
+ row.type = val.id
|
|
|
|
+ row.typeName = val.orderSmallTypeText
|
|
}}>
|
|
}}>
|
|
{
|
|
{
|
|
this.typeList.map((item, index) => {
|
|
this.typeList.map((item, index) => {
|
|
@@ -105,11 +106,14 @@ export default {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
return this.editIndex == index?(
|
|
return this.editIndex == index?(
|
|
<div class="redbordererr">
|
|
<div class="redbordererr">
|
|
- <el-form-item prop={`tableData.${index}.parentCategory`} rules={[{required: true, message: '产品大类不能为空', trigger: 'blur'}]}>
|
|
|
|
- <el-select value={row.parentCategory} value-key="name" placeholder="请选择"
|
|
|
|
|
|
+ <el-form-item prop={`tableData.${index}.parentCategoryId`} rules={[{required: true, message: '产品大类不能为空', trigger: 'blur'}]}>
|
|
|
|
+ <el-select value={{categoryId:row.parentCategoryId,name: row.parentCategoryName}} value-key="name" placeholder="请选择"
|
|
onInput={(val)=>{
|
|
onInput={(val)=>{
|
|
- row.parentCategory=val
|
|
|
|
- this.smallList = [...[{name: '通用', categoryId: 0}],...val.children]
|
|
|
|
|
|
+ row.parentCategoryId=val.categoryId
|
|
|
|
+ row.parentCategoryName=val.name
|
|
|
|
+ row.categoryName = ''
|
|
|
|
+ row.categoryId = ''
|
|
|
|
+ this.smallList = [...[{name: '通用', categoryId: '0'}],...(val.children?val.children:[])]
|
|
}}>
|
|
}}>
|
|
{
|
|
{
|
|
this.mainList.map((item, index) => {
|
|
this.mainList.map((item, index) => {
|
|
@@ -126,10 +130,11 @@ export default {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
return this.editIndex == index? (
|
|
return this.editIndex == index? (
|
|
<div class="redbordererr">
|
|
<div class="redbordererr">
|
|
- <el-form-item prop={`tableData.${index}.category`} rules={[{required: true, message: '产品小类不能为空', trigger: 'blur'}]}>
|
|
|
|
- <el-select value={row.category} value-key="name" placeholder="请选择"
|
|
|
|
|
|
+ <el-form-item prop={`tableData.${index}.categoryId`} rules={[{required: true, message: '产品小类不能为空', trigger: 'blur'}]}>
|
|
|
|
+ <el-select value={{categoryId: row.categoryId,name: row.categoryName}} value-key="name" placeholder="请选择"
|
|
onInput={(val)=>{
|
|
onInput={(val)=>{
|
|
- row.category=val
|
|
|
|
|
|
+ row.categoryName=val.name
|
|
|
|
+ row.categoryId=val.categoryId
|
|
}}>
|
|
}}>
|
|
{
|
|
{
|
|
this.smallList.map((item, index) => {
|
|
this.smallList.map((item, index) => {
|
|
@@ -225,14 +230,11 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
if(this.editIndex != index){
|
|
if(this.editIndex != index){
|
|
row = Object.assign(row,{
|
|
row = Object.assign(row,{
|
|
- types: {orderSmallTypeText: row.typeName,id: row.type},
|
|
|
|
- parentCategory: {name: row.parentCategoryName,categoryId: row.parentCategoryId},
|
|
|
|
- category: {name: row.categoryName,categoryId: row.categoryId},
|
|
|
|
label: row.label =='保内'?'INSIDE':'OUT'
|
|
label: row.label =='保内'?'INSIDE':'OUT'
|
|
})
|
|
})
|
|
this.mainList.forEach(item =>{
|
|
this.mainList.forEach(item =>{
|
|
if(item.categoryId == row.parentCategoryId){
|
|
if(item.categoryId == row.parentCategoryId){
|
|
- this.smallList = [...[{name: '通用', categoryId: 0}],...item.children]
|
|
|
|
|
|
+ this.smallList = [...[{name: '通用', categoryId: '0'}],...(item.children?item.children:[])]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.editIndex = index
|
|
this.editIndex = index
|
|
@@ -293,9 +295,12 @@ export default {
|
|
this.$refs.pageRef.insertionData(0,{
|
|
this.$refs.pageRef.insertionData(0,{
|
|
companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
settleNormType: 'REPAIR',
|
|
settleNormType: 'REPAIR',
|
|
- types: '',
|
|
|
|
- parentCategory: '',
|
|
|
|
- category: '',
|
|
|
|
|
|
+ typeName: '',
|
|
|
|
+ type: '',
|
|
|
|
+ categoryName: '',
|
|
|
|
+ categoryId: '',
|
|
|
|
+ parentCategoryName: '',
|
|
|
|
+ parentCategoryId: '',
|
|
label: '',
|
|
label: '',
|
|
normAmount: '',
|
|
normAmount: '',
|
|
repairAmount: '',
|
|
repairAmount: '',
|
|
@@ -313,12 +318,12 @@ export default {
|
|
add(row){
|
|
add(row){
|
|
add({
|
|
add({
|
|
settleNormType: 'REPAIR',
|
|
settleNormType: 'REPAIR',
|
|
- typeName: row.types.orderSmallTypeText,
|
|
|
|
- type: row.types.id,
|
|
|
|
- parentCategoryName: row.parentCategory.name,
|
|
|
|
- parentCategoryId: row.parentCategory.categoryId,
|
|
|
|
- categoryName: row.category.name,
|
|
|
|
- categoryId: row.category.categoryId,
|
|
|
|
|
|
+ typeName: row.typeName,
|
|
|
|
+ type: row.type,
|
|
|
|
+ parentCategoryName: row.parentCategoryName,
|
|
|
|
+ parentCategoryId: row.parentCategoryId,
|
|
|
|
+ categoryName: row.categoryName,
|
|
|
|
+ categoryId: row.categoryId,
|
|
label: row.label,
|
|
label: row.label,
|
|
normAmount: row.normAmount,
|
|
normAmount: row.normAmount,
|
|
repairAmount: row.repairAmount,
|
|
repairAmount: row.repairAmount,
|
|
@@ -335,12 +340,12 @@ export default {
|
|
edit({
|
|
edit({
|
|
id: row.id,
|
|
id: row.id,
|
|
settleNormType: 'REPAIR',
|
|
settleNormType: 'REPAIR',
|
|
- typeName: row.types.orderSmallTypeText,
|
|
|
|
- type: row.types.id,
|
|
|
|
- parentCategoryName: row.parentCategory.name,
|
|
|
|
- parentCategoryId: row.parentCategory.categoryId,
|
|
|
|
- categoryName: row.category.name,
|
|
|
|
- categoryId: row.category.categoryId,
|
|
|
|
|
|
+ typeName: row.typeName,
|
|
|
|
+ type: row.type,
|
|
|
|
+ parentCategoryName: row.parentCategoryName,
|
|
|
|
+ parentCategoryId: row.parentCategoryId,
|
|
|
|
+ categoryName: row.categoryName,
|
|
|
|
+ categoryId: row.categoryId,
|
|
label: row.label,
|
|
label: row.label,
|
|
normAmount: row.normAmount,
|
|
normAmount: row.normAmount,
|
|
repairAmount: row.repairAmount,
|
|
repairAmount: row.repairAmount,
|