rev: 修改
This commit is contained in:
@@ -160,6 +160,7 @@
|
||||
<udOperation
|
||||
:disabled-dle="scope.row.qty != '0'"
|
||||
:data="scope.row"
|
||||
:is-visiable-edit="false"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
@@ -207,7 +208,7 @@ export default {
|
||||
title: '组桶记录',
|
||||
url: 'api/bucked',
|
||||
optShow: {
|
||||
add: true,
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
:disabled-edit="scope.row.status !== '1'"
|
||||
:disabled-dle="scope.row.status !== '1'"
|
||||
:data="scope.row"
|
||||
:is-visiable-edit="false"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
@@ -136,7 +137,7 @@ export default {
|
||||
title: '组盘记录',
|
||||
url: 'api/group',
|
||||
optShow: {
|
||||
add: true,
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
:disabled-edit="scope.row.status !== '0'"
|
||||
:disabled-dle="scope.row.status !== '0'"
|
||||
:data="scope.row"
|
||||
:is-visiable-edit="false"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
@@ -260,7 +261,7 @@ export default {
|
||||
title: '组袋记录',
|
||||
url: 'api/group',
|
||||
optShow: {
|
||||
add: true,
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
|
||||
@@ -65,29 +65,76 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-form-item label="规格" prop="material_spec">
|
||||
<label slot="label">规 格</label>
|
||||
<el-input v-model="form.material_spec" style="width: 200px;" />
|
||||
<el-form-item label="物料分类" prop="material_type_id">
|
||||
<el-select
|
||||
v-model="form.material_type_id"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="物料分类"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classList"
|
||||
:label="item.class_name"
|
||||
:value="item.class_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="型号" prop="material_model">
|
||||
<label slot="label">型 号</label>
|
||||
<el-input v-model="form.material_model" style="width: 200px;" />
|
||||
<el-form-item label="供应商" prop="supp_code">
|
||||
<el-select
|
||||
v-model="form.supp_code"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="供应商"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in suppList"
|
||||
:label="item.supp_name"
|
||||
:value="item.supp_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="外部标识" prop="ext_id">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
<el-form-item label="生产商" prop="produce_name">
|
||||
<el-input v-model="form.produce_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="质量代码" prop="quality_code">
|
||||
<el-input v-model="form.quality_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="静置时间" prop="standing_time">
|
||||
<el-input-number v-model="form.standing_time" :controls="false" :min="0" label="分钟" style="width: 200px;" />
|
||||
<el-form-item label="储存条件" prop="storage_conditions">
|
||||
<el-input v-model="form.storage_conditions" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计量单位" prop="base_unit_id">
|
||||
<el-select
|
||||
v-model="form.base_unit_id"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="计量单位"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
:label="item.unit_name"
|
||||
:value="item.measure_unit_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -100,9 +147,75 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<!-- <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>-->
|
||||
<el-button type="primary" @click="userDialog = true">复核确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="复核确认"
|
||||
append-to-body
|
||||
width="400px"
|
||||
:visible.sync="userDialog"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用户账号" prop="username">
|
||||
<el-input v-model="form.username" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用户密码" prop="password">
|
||||
<!-- <el-input v-model="form.password" style="width: 200px;" />-->
|
||||
<el-input
|
||||
v-model="form.password"
|
||||
type="password"
|
||||
show-password
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="userDialog = false">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="复核确认"
|
||||
append-to-body
|
||||
width="400px"
|
||||
:visible.sync="deleteDialog"
|
||||
>
|
||||
<el-form ref="form2" :model="form2" :rules="rules" size="mini" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用户账号" prop="username">
|
||||
<el-input v-model="form2.username" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用户密码" prop="password">
|
||||
<el-input
|
||||
v-model="form2.password"
|
||||
type="password"
|
||||
show-password
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="deleteDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="deleteRow">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -138,14 +251,17 @@
|
||||
v-permission="['admin','Materialbase:edit','Materialbase:del']"
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="120px"
|
||||
width="150px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:is-visiable-del="false"
|
||||
style="display: inline"
|
||||
:permission="permission"
|
||||
/>
|
||||
<el-button icon="el-icon-delete" type="text" size="mini" @click="openDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -172,11 +288,14 @@ const defaultForm = {
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
material_model: null,
|
||||
supp_code: null,
|
||||
english_name: null,
|
||||
quality_code: null,
|
||||
base_unit_id: null,
|
||||
approve_fileno: null,
|
||||
print_no: null,
|
||||
material_type_id: null,
|
||||
produce_name: null,
|
||||
len_unit_id: null,
|
||||
length: null,
|
||||
width: null,
|
||||
@@ -197,6 +316,9 @@ const defaultForm = {
|
||||
is_delete: null,
|
||||
ext_id: null,
|
||||
material_height_type: null,
|
||||
storage_conditions: null,
|
||||
username: null,
|
||||
password: null,
|
||||
product_series: null
|
||||
}
|
||||
export default {
|
||||
@@ -220,11 +342,17 @@ export default {
|
||||
classes1: [],
|
||||
classes2: [],
|
||||
classes3: [],
|
||||
classList: [],
|
||||
suppList: [],
|
||||
unitList: [],
|
||||
fullscreenLoading: false,
|
||||
showDtlLoading: false,
|
||||
measure_unit: [],
|
||||
productSeries: [],
|
||||
permission: {},
|
||||
form2: {},
|
||||
userDialog: false,
|
||||
deleteDialog: false,
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
@@ -244,17 +372,37 @@ export default {
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_height_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
supp_code: [
|
||||
{ required: true, message: '供应商不能为空', trigger: 'blur' }
|
||||
],
|
||||
base_unit_id: [
|
||||
{ required: true, message: '计量单位不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_type_id: [
|
||||
{ required: true, message: '物料类别不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudMaterial.getClassList().then(res => {
|
||||
this.classList = res
|
||||
})
|
||||
crudMaterial.getSuppList().then(res => {
|
||||
this.suppList = res
|
||||
})
|
||||
crudMaterial.getUnitList().then(res => {
|
||||
this.unitList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterSubmit]() {
|
||||
this.userDialog = false
|
||||
},
|
||||
[CRUD.HOOK.beforeToCU](crud, form) {
|
||||
},
|
||||
materialSync() {
|
||||
@@ -300,6 +448,18 @@ export default {
|
||||
}).catch(() => {
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
},
|
||||
openDelete(row) {
|
||||
this.form2 = row
|
||||
this.deleteDialog = true
|
||||
},
|
||||
deleteRow() {
|
||||
crudMaterial.deleteRow(this.form2).then(res => {
|
||||
this.form2 = {}
|
||||
this.deleteDialog = false
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,4 +55,36 @@ export function materialSync(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries, materialSync }
|
||||
export function getClassList(data) {
|
||||
return request({
|
||||
url: 'api/Materia/getClassList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSuppList(data) {
|
||||
return request({
|
||||
url: 'api/Materia/getSuppList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getUnitList(data) {
|
||||
return request({
|
||||
url: 'api/Materia/getUnitList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRow(data) {
|
||||
return request({
|
||||
url: 'api/Materia/deleteRow',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries, materialSync, getClassList, getSuppList, getUnitList, deleteRow }
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="weigth" label="载具重量" />
|
||||
<!-- <el-table-column prop="weigth" label="载具重量" />-->
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
|
||||
Reference in New Issue
Block a user