优化
This commit is contained in:
@@ -199,7 +199,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import producetask from '@/api/wms/pdm/producetask'
|
import crudProducetask from '@/api/wms/pdm/producetask'
|
||||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -220,10 +220,11 @@ export default {
|
|||||||
url: 'api/producetask',
|
url: 'api/producetask',
|
||||||
idField: 'plan_id',
|
idField: 'plan_id',
|
||||||
sort: 'plan_id,desc',
|
sort: 'plan_id,desc',
|
||||||
|
crudMethod: { ...crudProducetask },
|
||||||
optShow: {
|
optShow: {
|
||||||
add: false,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: true,
|
del: false,
|
||||||
download: false,
|
download: false,
|
||||||
reset: false
|
reset: false
|
||||||
}})
|
}})
|
||||||
@@ -237,6 +238,7 @@ export default {
|
|||||||
nowAction: this.baseApi + '/api/producetask/importExcel/1',
|
nowAction: this.baseApi + '/api/producetask/importExcel/1',
|
||||||
Depts: [],
|
Depts: [],
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
fullscreenLoading: false,
|
||||||
checkrows: [],
|
checkrows: [],
|
||||||
permission: {
|
permission: {
|
||||||
del: ['admin', 'producetask:del']
|
del: ['admin', 'producetask:del']
|
||||||
@@ -293,6 +295,7 @@ export default {
|
|||||||
this.$confirm('确认关闭?')
|
this.$confirm('确认关闭?')
|
||||||
.then(_ => {
|
.then(_ => {
|
||||||
done()
|
done()
|
||||||
|
this.crud.loading = false
|
||||||
})
|
})
|
||||||
.catch(_ => {
|
.catch(_ => {
|
||||||
})
|
})
|
||||||
@@ -301,7 +304,7 @@ export default {
|
|||||||
let isLt2M = true
|
let isLt2M = true
|
||||||
isLt2M = file.size / 1024 / 1024 < 100
|
isLt2M = file.size / 1024 / 1024 < 100
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
this.loading = false
|
this.crud.loading = false
|
||||||
this.$message.error('上传文件大小不能超过 100MB!')
|
this.$message.error('上传文件大小不能超过 100MB!')
|
||||||
}
|
}
|
||||||
this.form.name = file.name
|
this.form.name = file.name
|
||||||
@@ -312,6 +315,7 @@ export default {
|
|||||||
this.sub_flag = true
|
this.sub_flag = true
|
||||||
},
|
},
|
||||||
handleSuccess(response, file, fileList) {
|
handleSuccess(response, file, fileList) {
|
||||||
|
this.crud.loading = false
|
||||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
@@ -323,12 +327,13 @@ export default {
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 2500
|
duration: 2500
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.crud.loading = false
|
||||||
},
|
},
|
||||||
stateFormat(row) {
|
stateFormat(row) {
|
||||||
return this.dict.label.is_proc[row.is_proc]
|
return this.dict.label.is_proc[row.is_proc]
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
|
this.crud.loading = true
|
||||||
const a = this.fileList
|
const a = this.fileList
|
||||||
this.fileList = a.splice(0, 0)
|
this.fileList = a.splice(0, 0)
|
||||||
this.nowAction = this.baseApi + '/api/producetask/importExcel/1'
|
this.nowAction = this.baseApi + '/api/producetask/importExcel/1'
|
||||||
@@ -358,7 +363,7 @@ export default {
|
|||||||
this.crud.notify('无可提交的记录!')
|
this.crud.notify('无可提交的记录!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
producetask.submit({'status': '0', rows: this.checkrows}).then(res => {
|
crudProducetask.submit({'status': '0', rows: this.checkrows}).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.querytable()
|
this.querytable()
|
||||||
})
|
})
|
||||||
@@ -369,7 +374,7 @@ export default {
|
|||||||
this.crud.notify('请勾选需要提交的记录!')
|
this.crud.notify('请勾选需要提交的记录!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
producetask.submit({'status': '1', rows: this.checkrows}).then(res => {
|
crudProducetask.submit({'status': '1', rows: this.checkrows}).then(res => {
|
||||||
this.crud.notify('操作成功!')
|
this.crud.notify('操作成功!')
|
||||||
this.querytable()
|
this.querytable()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user