Merge remote-tracking branch 'origin/master' into aps_0918
This commit is contained in:
@@ -315,7 +315,7 @@ export default {
|
||||
})
|
||||
},
|
||||
inv_typeFormat(row) {
|
||||
debugger
|
||||
|
||||
if (row.invcode.includes('WXD')) {
|
||||
return this.dict.label.EM_DEVICE_WX_INVTYPE[row.invtype]
|
||||
} else {
|
||||
|
||||
@@ -144,7 +144,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
|
||||
const data = {
|
||||
'repair_id': this.form.repair_id
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
|
||||
const data = {
|
||||
'maint_id': this.form.maint_id
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ export default {
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
debugger
|
||||
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
|
||||
@@ -360,7 +360,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.sect_id = val[0]
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
const data = this.form1
|
||||
if (data.maint_plan_name === null) {
|
||||
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -196,7 +196,7 @@ export default {
|
||||
this.openBom = row
|
||||
},
|
||||
tableChanged2(row) {
|
||||
debugger
|
||||
|
||||
// const arr = this.fileBom
|
||||
// for (let i = 0; i < arr.length; i++) {
|
||||
// if (i === this.fileBomindex) {
|
||||
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
|
||||
this.material_id = this.openParam.material_id
|
||||
this.query.material_id = this.material_id
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
this.form3.device_id = row.device_id
|
||||
},
|
||||
tableChanged(rows) {
|
||||
debugger
|
||||
|
||||
const arr = rows
|
||||
arr.forEach((item) => {
|
||||
this.tableData.push(item)
|
||||
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
this.form3.device_id = row.device_id
|
||||
},
|
||||
tableChanged(rows) {
|
||||
debugger
|
||||
|
||||
const arr = rows
|
||||
arr.forEach((item) => {
|
||||
this.tableData.push(item)
|
||||
|
||||
@@ -319,7 +319,7 @@ export default {
|
||||
},
|
||||
// 下发按钮禁用条件
|
||||
is_disabled(rows) {
|
||||
debugger
|
||||
|
||||
this.checkrows = rows
|
||||
if (this.checkrows.length == 0){
|
||||
return true
|
||||
@@ -417,7 +417,7 @@ export default {
|
||||
})
|
||||
},
|
||||
Picconfirm(index, row) {
|
||||
debugger
|
||||
|
||||
this.$refs.child.setForm(row.request_code)
|
||||
this.PicDialog = true
|
||||
},
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
const data = this.form1
|
||||
if (data.maint_plan_name === null) {
|
||||
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
const data = this.form1
|
||||
if (data.maint_plan_name === null) {
|
||||
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.device_faultclass_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -227,9 +227,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -302,7 +302,7 @@ export default {
|
||||
},
|
||||
getSubTypes(id) {
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -301,9 +301,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -226,9 +226,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -302,7 +302,7 @@ export default {
|
||||
},
|
||||
getSubTypes(id) {
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="设备选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">设备搜索</label>
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入设备编码或名称"
|
||||
style="width: 220px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;margin-top: 15px"
|
||||
size="mini"
|
||||
border
|
||||
:cell-style="{'text-align':'center'}"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column prop="device_name" label="设备名称" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import equipmentfile from '@/views/wms/device_manage/deviceFile/equipmentfile/equipmentfile'
|
||||
|
||||
export default {
|
||||
name: 'SelectDeviceDialog',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '设备选择', url: 'api/equipmentfile', crudMethod: { ...equipmentfile }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableRadio: null,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
},
|
||||
setForm(user_id) {
|
||||
this.user_id = user_id
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.afterRefresh]() {
|
||||
return true
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
if (this.tableRadio === null) {
|
||||
this.$message('至少选择一条设备信息')
|
||||
return
|
||||
}
|
||||
console.log(this.crud.selections)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged3', this.tableRadio)
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="query.user_id === ''">
|
||||
<div class="my-code">点击查看设备详情</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.label"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="输入字典标签查询"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
</div>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="设备编码" prop="device_code">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.device_code" disabled style="width: 250px;" clearable >
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryDevice(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column label="所属人员" min-width="100" show-overflow-tooltip>
|
||||
{{ query.person_name }}
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" align="center" width="120" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
v-permission="['admin','dict:edit','dict:del']"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="115px"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<SelectDeviceDialog ref="selectDeviceDialog" :dialog-show.sync="deviceShow" @tableChanged3="tableChanged3" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPersoncorrdevice from '@/views/wms/masterdata_manage/em/repairpersondevice/repairpersondevice'
|
||||
import CRUD, { form, header, presenter } from '@crud/crud'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import SelectDeviceDialog from './SelectDeviceDialog'
|
||||
|
||||
const defaultForm = {
|
||||
device_code: null
|
||||
}
|
||||
|
||||
export default {
|
||||
components: { pagination, rrOperation, udOperation, SelectDeviceDialog },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({
|
||||
title: '设备详情',
|
||||
url: 'api/embirepairdevice/device',
|
||||
query: { code: '' },
|
||||
idField: 'person_id',
|
||||
sort: ['person_id,asc', 'person_id,desc'],
|
||||
crudMethod: { ...crudPersoncorrdevice },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
del: true,
|
||||
reset: false
|
||||
},
|
||||
queryOnPresenterCreated: false
|
||||
})
|
||||
]
|
||||
},
|
||||
mixins: [
|
||||
presenter(),
|
||||
header(),
|
||||
form(function() {
|
||||
return Object.assign({}, defaultForm)
|
||||
})],
|
||||
data() {
|
||||
return {
|
||||
dictId: null,
|
||||
deviceShow: false,
|
||||
rules: {
|
||||
device_code: [
|
||||
{ required: true, message: '请输入设备号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryDevice() {
|
||||
this.deviceShow = true
|
||||
},
|
||||
tableChanged3(row) {
|
||||
this.form.device_code = row.device_code
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 字典列表 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :xs="13" :sm="13" :md="13" :lg="13" :xl="13" style="margin-bottom: 10px">
|
||||
<el-card class="box-card">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.username" clearable size="mini" placeholder="输入人员名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation />
|
||||
</div>
|
||||
<crudOperation :permission="permission" />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange">
|
||||
<el-table-column prop="username" label="用户名" />
|
||||
<el-table-column prop="person_name" label="名称" />
|
||||
<el-table-column prop="gender" label="性别" />
|
||||
<el-table-column prop="phone" label="手机号码" width="110" />
|
||||
<el-table-column prop="email" label="邮箱" width="140" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- 字典详情列表 -->
|
||||
<el-col :xs="11" :sm="11" :md="11" :lg="11" :xl="11">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设备详情</span>
|
||||
<el-button
|
||||
v-if="this.rowDtl !== null"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
style="float: right;padding: 4px 10px"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="$refs.dictDetail && $refs.dictDetail.crud.toAdd()"
|
||||
>新增</el-button>
|
||||
</div>
|
||||
<dictDetail ref="dictDetail" :permission="permission" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission'
|
||||
import dictDetail from './dictDetail.vue'
|
||||
import crudPersoncorrdevice from '@/views/wms/masterdata_manage/em/repairpersondevice/repairpersondevice'
|
||||
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = {}
|
||||
|
||||
export default {
|
||||
name: 'Repairpersondevice',
|
||||
components: { crudOperation, pagination, rrOperation, udOperation, dictDetail },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({
|
||||
title: '维修人与设备档案维护',
|
||||
url: 'api/embirepairdevice',
|
||||
idField: 'jockey_id',
|
||||
crudMethod: { ...crudPersoncorrdevice },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
data() {
|
||||
return {
|
||||
rowDtl: null,
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '字典名称' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
],
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入编码', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
// 获取数据前设置好接口地址
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.$refs.dictDetail) {
|
||||
this.$refs.dictDetail.query.user_id = ''
|
||||
this.rowDtl = null
|
||||
this.$refs.dictDetail.crud.toQuery()
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 选中字典后,设置字典详情数据
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
this.rowDtl = val
|
||||
this.$refs.dictDetail.query.user_id = val.user_id
|
||||
this.$refs.dictDetail.query.person_name = val.person_name
|
||||
this.$refs.dictDetail.form.user_id = val.user_id
|
||||
this.$refs.dictDetail.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addPersons(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/addPersons',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getHeader(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/getHeader',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeviceIdByUserId(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/getDeviceIdByUserId',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addDevices(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/addDevices',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRow(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/deleteRow',
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, addPersons, getHeader, deleteRow, addDevices }
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -236,7 +236,7 @@ export default {
|
||||
let optType = null
|
||||
|
||||
const isCopyAdd = this.$parent.isCopyAdd
|
||||
debugger
|
||||
|
||||
if (isCopyAdd === '1') {
|
||||
optType = '01' // 复制新增
|
||||
} else if (this.crud.status.add === 1) {
|
||||
@@ -251,7 +251,7 @@ export default {
|
||||
const that = this
|
||||
const errMsgList = []
|
||||
const data = arr.map(function(item) {
|
||||
debugger
|
||||
|
||||
// 合格上下限同时为填入的数字或同时为空
|
||||
if ((!isNaN(item.up_limit) && !isNaN(item.down_limit)) || (isNaN(item.up_limit) && isNaN(item.down_limit))) {
|
||||
// 临界上下限同时为填入的数字或同时为空
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/structivtDaily',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/structivtDaily',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/structivtDaily',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del }
|
||||
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码,规格"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<!--
|
||||
<el-table-column type="selection" width="55" />
|
||||
-->
|
||||
<el-table-column prop="stor_name" label="所属仓库" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="sect_name" label="所属库区" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_code" label="所属仓位" width="120" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="150" />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="150" />
|
||||
<el-table-column prop="material_id" label="物料id" width="150" />
|
||||
<el-table-column prop="canuse_qty" label="可用总数" width="150" />
|
||||
<el-table-column prop="ivt_qty" label="库存总数" width="150" />
|
||||
<el-table-column prop="frozen_qty" label="冻结总数" width="150" />
|
||||
<el-table-column prop="warehousing_qty" label="待入总数" width="150" />
|
||||
<el-table-column prop="qty_unit_id" label="单位" width="150" :formatter="formatUnit"/>
|
||||
<el-table-column prop="create_time" label="统计日期" width="150" fixed="right" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dailyStructivt from '@/views/wms/masterdata_manage/st/dailyStructivt/dailyStructivt'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudMdPbMeasureunit from '@/api/wms/basedata/master/mdPbMeasureunit'
|
||||
|
||||
const defaultForm = {
|
||||
struct_id: null,
|
||||
cascader: null,
|
||||
struct_code: null,
|
||||
struct_name: null,
|
||||
simple_name: null,
|
||||
sect_id: null,
|
||||
sect_code: null,
|
||||
sect_name: null,
|
||||
stor_id: null,
|
||||
material_code: null,
|
||||
stor_code: null,
|
||||
stor_name: null,
|
||||
stor_type: null,
|
||||
capacity: null,
|
||||
width: null,
|
||||
height: null,
|
||||
zdepth: null,
|
||||
weight: null,
|
||||
xqty: null,
|
||||
yqty: null,
|
||||
zqty: null,
|
||||
is_tempstruct: '0',
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
back_ground_color: null,
|
||||
front_ground_color: null,
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
is_used: true,
|
||||
is_zdepth: null,
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
storagevehicle_type: null,
|
||||
is_emptyvehicle: null,
|
||||
storagevehicle_qty: null,
|
||||
lock_type: null,
|
||||
material_height_type: null,
|
||||
ext_id: null,
|
||||
remark: null
|
||||
}
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_INV_BCP_IN_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '仓位',
|
||||
optShow: { add: false, reset: true },
|
||||
url: 'api/structivtDaily',
|
||||
idField: 'id',
|
||||
crudMethod: { ...dailyStructivt }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
const numberOne = (rule, value, callback) => {
|
||||
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
|
||||
const numRe = new RegExp(numReg)
|
||||
if (value) {
|
||||
if (!numRe.test(value)) {
|
||||
callback(new Error('只能输入数字'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
measure_unit:[],
|
||||
sects: [],
|
||||
permission: {
|
||||
add: ['admin', 'dept:add'],
|
||||
edit: ['admin', 'dept:edit'],
|
||||
del: ['admin', 'dept:del']
|
||||
},
|
||||
trueorfalse: [ { value: true, label: '是' }, { value: false, label: '否' }]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({}).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
crudMdPbMeasureunit.getSelect().then(res => {
|
||||
this.measure_unit = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
sectChange(val) {
|
||||
this.form.sect_id = val[1]
|
||||
},
|
||||
formatUnit(row, column) {
|
||||
const values = this.measure_unit.filter(v => {
|
||||
return v.value === row.qty_unit_id
|
||||
})
|
||||
return values[0].label
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -274,7 +274,7 @@ export default {
|
||||
crud.downloadLoading = true
|
||||
download('/api/pcsIfPurchaseorder/download', this.crud.query
|
||||
).then(result => {
|
||||
debugger
|
||||
|
||||
downloadFile(result, '原料需求', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
|
||||
@@ -307,7 +307,7 @@ export default {
|
||||
this.deviceList.forEach(row => {
|
||||
res.check_list.forEach(selected => {
|
||||
if (selected.device_code === row.device_code) {
|
||||
debugger
|
||||
|
||||
this.$refs.multipleTable.toggleRowSelection(row, true)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
var formdata = new FormData()
|
||||
formdata.append('file', this.file1.raw)
|
||||
crudbucketrecord.excelImport(formdata).then((res) => {
|
||||
debugger
|
||||
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
|
||||
@@ -372,7 +372,7 @@ export default {
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
rows.forEach((row) => {
|
||||
debugger
|
||||
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.base_bill_code === row.sale_code && item.base_bill_table === row.seq_no) {
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
this.form.dtl_row = row
|
||||
this.form.storage_qty = this.form.dtl_row.plan_qty
|
||||
crudProductIn.getIosInvDis({ 'iostorinv_id': row.iostorinv_id, 'iostorinvdtl_id': row.iostorinvdtl_id }).then(res => {
|
||||
debugger
|
||||
|
||||
if (res.length !== 0) {
|
||||
this.form.tableMater = res
|
||||
}
|
||||
@@ -379,7 +379,7 @@ export default {
|
||||
})
|
||||
},
|
||||
changeQty(val) {
|
||||
debugger
|
||||
|
||||
if (parseFloat(this.form.dtl_row.plan_qty) < parseFloat(val)) {
|
||||
this.crud.notify('放入数量不能大于明细数量!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.$set(this.form, 'storage_qty', parseFloat(this.form.dtl_row.plan_qty))
|
||||
@@ -544,7 +544,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.stor_id = val[0]
|
||||
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
this.queryTableDdis()
|
||||
},
|
||||
clcikDisRow(row) {
|
||||
debugger
|
||||
|
||||
this.dis_row = row
|
||||
if (this.dis_row.task_status < 5) {
|
||||
this.dis_del = false
|
||||
|
||||
@@ -323,7 +323,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -386,7 +386,7 @@ export default {
|
||||
this.form.sect_name = row.sect_name
|
||||
this.form.struct_name = row.struct_name
|
||||
crudMoreOrless.getStructIvt({'struct_id': row.struct_id}).then(res => {
|
||||
debugger
|
||||
|
||||
this.form.tableData = res
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
|
||||
@@ -213,7 +213,7 @@ export default {
|
||||
'data': this.rows
|
||||
}
|
||||
productOut.queryStructAll(data).then(res => {
|
||||
debugger
|
||||
|
||||
this.rows = res
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openStructIvt() {
|
||||
debugger
|
||||
|
||||
if (this.currentRow.iostorinv_id === undefined) {
|
||||
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
this.queryTableDdis()
|
||||
},
|
||||
clcikDisRow(row) {
|
||||
debugger
|
||||
|
||||
this.dis_row = row
|
||||
if (this.dis_row.task_status < 5) {
|
||||
this.dis_del = false
|
||||
|
||||
@@ -278,7 +278,7 @@ export default {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
toView(row) {
|
||||
debugger
|
||||
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CP_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl, BillDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -455,7 +455,7 @@ export default {
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
debugger
|
||||
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('setMaterValue', this.rows)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -144,7 +144,7 @@ export default {
|
||||
name: 'ViewDialog',
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
dicts: ['ST_INV_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
|
||||
dicts: ['ST_INV_RAW_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -65,6 +65,66 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--编辑详情-->
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
title="仓位物料设置"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="700px"
|
||||
close="closeView"
|
||||
>
|
||||
<el-form ref="form" :model="ivtForm" :rules="rules" size="mini" label-suffix=":" label-width="90px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库名称" prop="stor_name">
|
||||
<el-input v-model="ivtForm.stor_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库区名称" prop="struct_name">
|
||||
<el-input v-model="ivtForm.sect_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位编码">
|
||||
<el-input v-model="ivtForm.struct_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位名称">
|
||||
<el-input v-model="ivtForm.struct_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="ivtForm.material_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="ivtForm.material_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库存数数量">
|
||||
<el-input v-model="ivtForm.ivt_qty" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="closeView">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="updateIvt">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -87,6 +147,12 @@
|
||||
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click="updateMaterial(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -102,7 +168,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
|
||||
import ProductIvt from '@/views/wms/storage_manage/rawproduct/rawProductIvt/productivt'
|
||||
|
||||
export default {
|
||||
name: 'RawProductIvt',
|
||||
@@ -122,6 +188,8 @@ export default {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
ivtForm: {},
|
||||
dialogVisible: false,
|
||||
storlist: [],
|
||||
storId: null
|
||||
}
|
||||
@@ -138,6 +206,24 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
closeView(){
|
||||
this.ivtForm={}
|
||||
this.dialogVisible = false
|
||||
},
|
||||
updateMaterial(row){
|
||||
this.dialogVisible = true
|
||||
this.ivtForm = row
|
||||
this.ivtForm.old_qty = row.canuse_qty
|
||||
|
||||
},
|
||||
updateIvt(){
|
||||
ProductIvt.edit(this.ivtForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.closeView()
|
||||
}).catch(err => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp',
|
||||
url: '/api/stIvtStructivtYl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/delete',
|
||||
url: '/api/stIvtStructivtYl/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/update',
|
||||
url: '/api/stIvtStructivtYl/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -382,7 +382,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.sect_id = val[0]
|
||||
|
||||
@@ -316,7 +316,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -358,7 +358,7 @@ export default {
|
||||
downloadButton() {
|
||||
this.downloading = true
|
||||
download('/api/in/semiproductIn/download', this.query).then(result => {
|
||||
debugger
|
||||
|
||||
downloadFile(result, '半成品入库单', 'xlsx')
|
||||
this.downloading = false
|
||||
}).catch(() => {
|
||||
|
||||
@@ -322,7 +322,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -285,7 +285,7 @@ export default {
|
||||
this.materShow = true
|
||||
},
|
||||
tableChanged(row) {
|
||||
debugger
|
||||
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_id = row.material_id
|
||||
this.tableData1 = []
|
||||
@@ -298,11 +298,11 @@ export default {
|
||||
})
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
debugger
|
||||
|
||||
const row = this.form.tableData[index]
|
||||
const nowList = []
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
debugger
|
||||
|
||||
if (this.form.tableData[i].storagevehicle_code === row.storagevehicle_code) {
|
||||
this.tableData1.push(this.form.tableData[i])
|
||||
} else {
|
||||
@@ -313,7 +313,7 @@ export default {
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
deleteRow1(index, rows) {
|
||||
debugger
|
||||
|
||||
const tablemap = new Map()
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
tablemap.set(this.form.tableData[i].storagevehicle_code, this.form.tableData[i].storagevehicle_code)
|
||||
|
||||
Reference in New Issue
Block a user