This commit is contained in:
zds
2022-08-02 09:28:58 +08:00
parent 4fc5f2a985
commit e36f56c221

View File

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