Merge branch 'master' of http://123.56.95.229:10010/r/高精
This commit is contained in:
202
src/api/Inventory/PickingListSearch.js
Normal file
202
src/api/Inventory/PickingListSearch.js
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import state from '@/store'
|
||||||
|
import router from '@/router'
|
||||||
|
// var postData
|
||||||
|
// 初始化人员
|
||||||
|
export function initPickPerson() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '3',
|
||||||
|
name: 'select 姓名,人员编号 from 人事档案管理_人员名单 where 是否离职 = 0 order by 姓名 '
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 初始化机床项目
|
||||||
|
export function initMachineProject() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_项目名称_查询数据'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 组件查询
|
||||||
|
export function searchgroup(num) {
|
||||||
|
// postData = new URLSearchParams()
|
||||||
|
// postData.append('param', num)
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_组件名称_查询数据',
|
||||||
|
param: '机床流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询三表
|
||||||
|
export function searchTable(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间装配管理_领料单_三表_查询数据',
|
||||||
|
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&名称_check=${params[4]}&名称=${params[5]}&领料情况_check=${params[6]}&领料情况=${params[7]}&零件类型=${params[10]}`,
|
||||||
|
Pagination: params[8] + '&' + params[9]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function searchPart(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_离线外购件_出库查询',
|
||||||
|
param: `物料名称_check=${params[0]}&物料名称=${params[1]}`,
|
||||||
|
Pagination: params[2] + '&' + params[3]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 领料单查询
|
||||||
|
export function searchList(pageCurrent, pageSize, listPeople_check, listPeople, isElectrical, check1, time1, time2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间装配管理_领料单_查询数据',
|
||||||
|
param: '制单人_check=' + listPeople_check + '&制单人=' + listPeople + '&是否电气=' + isElectrical + '&时间段_check=' + check1 + '&开始时间=' + time1 + '&结束时间=' + time2,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 创建领料单
|
||||||
|
export function createList(num, remark, isElectrical, macnum, groupnum) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间装配管理_领料单_增加数据',
|
||||||
|
param: '领料人流水号=' + num + '&领料单备注=' + remark + '&是否电气=' + isElectrical + '&机床流水号=' + macnum + '&组件流水号=' + groupnum
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除领料单
|
||||||
|
export function dropList(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间装配管理_领料单_删除数据',
|
||||||
|
param: '领料单流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询领料单明细
|
||||||
|
export function searchListDetail(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间装配管理_领料单明细_查询数据_新LLJ',
|
||||||
|
param: `领料单流水号=${params[0]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 选入领料单
|
||||||
|
export function selectIntoList(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间装配管理_领料单明细_增加数据',
|
||||||
|
param: `基本件流水号组=${params[0]}&标准件和外购件流水号组=${params[1]}&领料单流水号=${params[2]}&领用数量组=${params[3]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 选入领料单
|
||||||
|
export function IntoMateerial(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '离线采购_领料明细_增加数据_循环',
|
||||||
|
param: `物料流水号组=${params[0]}&组件零件基本件流水号组=${params[1]}&领料数量组=${params[2]}&领料单流水号=${params[3]}&机床流水号=${params[4]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除领料单
|
||||||
|
export function dropListDetail(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间装配管理_领料单明细_删除数据',
|
||||||
|
param: '领料单明细流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询领料单明细详情
|
||||||
|
export function searchListDetailMX(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间装配管理_领料单明细_详情_查询数据',
|
||||||
|
param: `领料单流水号=${params[0]}&基本件流水号=${params[1]}&标准件和外购件流水号=${params[2]}&离线采购件流水号=${params[3]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询三表明细领料详情
|
||||||
|
export function searchTableDetailMX(...params) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间装配管理_三表_领料详情_查询数据',
|
||||||
|
param: `基本件流水号=${params[0]}&标准件和外购件流水号=${params[1]}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
843
src/views/Inventory/PickingListSearch/index.vue
Normal file
843
src/views/Inventory/PickingListSearch/index.vue
Normal file
@@ -0,0 +1,843 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div slot="header">
|
||||||
|
<el-card>
|
||||||
|
<el-row style="margin-top: 5px">
|
||||||
|
<el-input v-model="pickingListPeople" clearable size="small" placeholder="领料单编号/制单人/机床" style="width:190px;margin-left: 0px" />
|
||||||
|
<el-date-picker
|
||||||
|
v-model="startTime"
|
||||||
|
size="small"
|
||||||
|
type="daterange"
|
||||||
|
align="center"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
range-separator="~"
|
||||||
|
style="width:250px;margin-left: 10px"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"/>
|
||||||
|
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button>
|
||||||
|
<!--<el-button size="small" type="distribution" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="createList()">创建领料单</el-button>-->
|
||||||
|
<!--<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">-->
|
||||||
|
<!--<el-button :disabled="selectInto_disable || Number(审批情况)===1" size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button>-->
|
||||||
|
<!--</el-tooltip>-->
|
||||||
|
<!--<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button>-->
|
||||||
|
<!--<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>-->
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div style="width: 26%;float: left;margin-right: 19px">
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="listDetailsloading" :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="750px" @row-click="clickList">
|
||||||
|
<el-table-column prop="领料单编号" label="领料单编号" align="center" min-width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.领料单编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="制单人" prop="制单人" align="center" min-width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.姓名 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机床" prop="备注" align="center" min-width="130px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.领料单备注 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建日期" prop="创建日期" align="center" min-width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="float:left;margin: 10px 0;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent3"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="pageSize3"
|
||||||
|
:total="total3"
|
||||||
|
layout="total, sizes, prev, pager, next"
|
||||||
|
@size-change="handleSizeChange3"
|
||||||
|
@current-change="handleCurrentChange3"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div style="width: 72.5%;float: left">
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="listDetailsloading" :data="pickListTable2" border style="width: 100%;" size="mini" highlight-current-row height="800px" @row-click="searchMX">
|
||||||
|
<el-table-column v-if="true" label="状态" align="center" prop="是否领料确认" width="70px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领完</span>
|
||||||
|
<span v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">部分领用</span>
|
||||||
|
<span v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领料</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="名称" align="center" prop="名称" min-width="100" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" align="center" prop="图号或型号" min-width="110px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.图号或型号 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" align="center" prop="规格" min-width="120" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.规格 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机床图号" align="center" prop="机床图号" min-width="100" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="组号" align="center" prop="组号" width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="领用数" align="center" width="65">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.总数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备件数" align="center" width="65">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.备件数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已领数" align="center" width="65">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库数量1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--<el-table-column v-if="true" label="备料确认" align="center" prop="是否备料确认" min-width="75px">-->
|
||||||
|
<!--<template slot-scope="scope">-->
|
||||||
|
<!--<el-tag v-if="Number(scope.row.是否备料确认)===1" type="success" size="mini">已备料</el-tag>-->
|
||||||
|
<!--<el-tag v-else type="warning" size="mini">未备料</el-tag>-->
|
||||||
|
<!--</template>-->
|
||||||
|
<!--</el-table-column>-->
|
||||||
|
<el-table-column label="操作" align="center" min-width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-popover placement="right" width="500" trigger="click">
|
||||||
|
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
|
||||||
|
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||||
|
<el-table-column min-width="100" align="center" label="领料人">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.姓名 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="150" align="center" label="领料时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="100" align="center" label="数量" prop="出库数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button slot="reference" type="text" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">领料详情</el-button>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="创建领料单" center width="380px">
|
||||||
|
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left">
|
||||||
|
<el-form-item label="制单人" prop="领料人流水号" label-width="100px" size="small">
|
||||||
|
<el-select v-model="form1.领料人流水号" placeholder="请选择" size="small" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in pickPerson"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机床图号" prop="机床图号" label-width="100px">
|
||||||
|
<el-select v-model="form1.机床图号" filterable placeholder="选择机床图号" size="small" clearable @change="machineChange2()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in machineNumber"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
<div style="float: left">{{ item.label }}</div>
|
||||||
|
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="组号" prop="组号" label-width="100px">
|
||||||
|
<el-select v-model="form1.组号" filterable placeholder="选择组号" size="small" clearable @change="sss()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in groupNumber2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!--<el-form-item label="领料单备注" prop="领料单备注" label-width="100px">-->
|
||||||
|
<!--<!–<el-input v-model="form1.领料单备注" size="small" placeholder="备注" style="width: 200px"/>–>-->
|
||||||
|
<!--<span> {{ form1.领料单备注 }}</span>-->
|
||||||
|
<!--</el-form-item>-->
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible1=false">取消</el-button>
|
||||||
|
<el-button :disabled="createList_disable" type="primary" @click="submitCreateList()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, searchListDetailMX, searchPart, IntoMateerial } from '@/api/Inventory/PickingListSearch'
|
||||||
|
import request from '@/utils/request'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import { getNowDAY, get90DAY } from '@/utils/index'
|
||||||
|
export default {
|
||||||
|
name: 'CreatePickingList',
|
||||||
|
data() {
|
||||||
|
// var getNowDAY;
|
||||||
|
return {
|
||||||
|
createList_disable: false,
|
||||||
|
selectInto_disable: false,
|
||||||
|
审批情况: '',
|
||||||
|
peopleName: '',
|
||||||
|
ListMX: '',
|
||||||
|
startTime: [get90DAY(), getNowDAY()],
|
||||||
|
// startTime: [],
|
||||||
|
PartType: '基本件',
|
||||||
|
machineNumberValue: '',
|
||||||
|
machineNumber: [],
|
||||||
|
MachineNumber: '',
|
||||||
|
tableDataBasic: [],
|
||||||
|
PickingValue: false,
|
||||||
|
Picking: [{
|
||||||
|
value: 0,
|
||||||
|
label: '未领'
|
||||||
|
}, {
|
||||||
|
value: 1,
|
||||||
|
label: '已领'
|
||||||
|
}],
|
||||||
|
Name: '',
|
||||||
|
gridData: [],
|
||||||
|
groupNumberValue: '',
|
||||||
|
groupNumber: [],
|
||||||
|
groupNumber2: [],
|
||||||
|
tableData0: [],
|
||||||
|
tableData1: [],
|
||||||
|
tableData2: [],
|
||||||
|
pageCurrent0: 1,
|
||||||
|
pageSize0: 10,
|
||||||
|
total0: 0,
|
||||||
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 10,
|
||||||
|
total1: 0,
|
||||||
|
pageCurrent2: 1,
|
||||||
|
pageSize2: 10,
|
||||||
|
total2: 0,
|
||||||
|
pickListTable1: [],
|
||||||
|
pageCurrent3: 1,
|
||||||
|
pageSize3: 20,
|
||||||
|
total3: 0,
|
||||||
|
pageCurrent4: 1,
|
||||||
|
pageSize4: 10,
|
||||||
|
total4: 0,
|
||||||
|
pickListTable2: [],
|
||||||
|
dialogFormVisible1: false,
|
||||||
|
loading0: false,
|
||||||
|
loading1: false,
|
||||||
|
loading2: false,
|
||||||
|
listLoading: false,
|
||||||
|
listDetailsloading: false,
|
||||||
|
materialSpec: '', // 物料规格
|
||||||
|
materialModel: '', // 物料型号
|
||||||
|
form1: {
|
||||||
|
领料人流水号: '',
|
||||||
|
领料单备注: '',
|
||||||
|
机床图号: '',
|
||||||
|
组号: ''
|
||||||
|
},
|
||||||
|
rules1: {
|
||||||
|
领料人流水号: [{ required: true, message: '请选择制单人' }]
|
||||||
|
},
|
||||||
|
pickPerson: [],
|
||||||
|
pickingListPeople: '', // 制单人
|
||||||
|
pickingListNumberShow: '', // 领料单编号
|
||||||
|
pickingListNum: '', // 领料单流水号
|
||||||
|
multipleSelection: [],
|
||||||
|
multipleSelection1: [],
|
||||||
|
listDetailsName: '',
|
||||||
|
listDetailsPicnum: '',
|
||||||
|
listDetailsSpecifications: '',
|
||||||
|
listMachinenum: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'id',
|
||||||
|
'token'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.fetchData()
|
||||||
|
this.searchList()
|
||||||
|
console.log(getNowDAY(), get90DAY(), 'time')
|
||||||
|
// this.startTime = [get90DAY(). getNowDAY()]
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
sss() {
|
||||||
|
let obj_mac = {}
|
||||||
|
obj_mac = this.machineNumber.find((item) => {
|
||||||
|
return item.value === this.form1.机床图号
|
||||||
|
})
|
||||||
|
let obj_num = {}
|
||||||
|
obj_num = this.groupNumber2.find((item2) => {
|
||||||
|
return item2.value === this.form1.组号
|
||||||
|
})
|
||||||
|
console.log(obj_mac.label, obj_num.label)
|
||||||
|
this.form1.领料单备注 = obj_mac.label + '-' + obj_num.label.replace(/\s*/g, '')
|
||||||
|
},
|
||||||
|
// 组号 表单中
|
||||||
|
machineChange2() {
|
||||||
|
// this.groupNumberValue = ''
|
||||||
|
this.groupNumber2 = []
|
||||||
|
searchgroup(this.form1.机床图号).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.groupNumber2.push({
|
||||||
|
label: response.data[i].组号,
|
||||||
|
value: response.data[i].组件流水号
|
||||||
|
// value: response.data[i].组号
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// // 加载机床号
|
||||||
|
// initProject() {
|
||||||
|
// initMachineProject().then(response => {
|
||||||
|
// for (let i = 0; i < response.data.length; i++) {
|
||||||
|
// this.machineNumber.push({
|
||||||
|
// label: response.data[i].机床图号,
|
||||||
|
// name: response.data[i].项目名称,
|
||||||
|
// value: response.data[i].机床流水号
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// 组号
|
||||||
|
machineChange1() {
|
||||||
|
this.groupNumberValue = ''
|
||||||
|
this.groupNumber = []
|
||||||
|
searchgroup(this.form1.机床图号).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.groupNumber.push({
|
||||||
|
label: response.data[i].组号,
|
||||||
|
value: response.data[i].组件流水号
|
||||||
|
// value: response.data[i].组号
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 审批通过
|
||||||
|
approvalPass(row) {
|
||||||
|
this.$confirm('是否审批通过?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const param = {
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `update 车间装配管理_领料单 set 是否审批 = 1 where 领料单流水号 = ${row.领料单流水号}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request(param).then(res => {
|
||||||
|
if (res.data[0].result === '1') {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.searchList()
|
||||||
|
} else {
|
||||||
|
this.$message.error('操作失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 初始化数据
|
||||||
|
fetchData() {
|
||||||
|
initPickPerson().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.pickPerson.push({
|
||||||
|
label: response.data[i].姓名,
|
||||||
|
value: response.data[i].人员编号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
initMachineProject().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.machineNumber.push({
|
||||||
|
label: response.data[i].机床图号,
|
||||||
|
name: response.data[i].项目名称,
|
||||||
|
value: response.data[i].机床流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 根据机床查分组
|
||||||
|
machineChange() {
|
||||||
|
this.groupNumberValue = ''
|
||||||
|
this.groupNumber = []
|
||||||
|
searchgroup(this.machineNumberValue).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.groupNumber.push({
|
||||||
|
label: response.data[i].组号,
|
||||||
|
value: response.data[i].组件流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableRowClassName({ row }) {
|
||||||
|
if (parseInt(row.是否审批) === 1) {
|
||||||
|
return 'shenpi-row'
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectable(row, index) { // 控制某行是否可选
|
||||||
|
return row.领料单编号 === null // 未采购&&确认物料修改
|
||||||
|
},
|
||||||
|
selectable1(row) {
|
||||||
|
return row.领用数量 !== 0
|
||||||
|
},
|
||||||
|
// 查三表
|
||||||
|
searchTable() {
|
||||||
|
console.log(this.PartType, this.machineNumberValue)
|
||||||
|
if (this.PartType === '离线采购件') {
|
||||||
|
this.machineNumberValue = ''
|
||||||
|
this.groupNumberValue = ''
|
||||||
|
this.searchTable4()
|
||||||
|
}
|
||||||
|
if ((this.machineNumberValue !== '' && this.machineNumberValue !== null) || this.PartType === '离线采购件') {
|
||||||
|
this.multipleSelection = []
|
||||||
|
this.multipleSelection1 = []
|
||||||
|
if (this.PartType === '标准件') {
|
||||||
|
this.searchTable0()
|
||||||
|
} else if (this.PartType === '外购件') {
|
||||||
|
this.searchTable1()
|
||||||
|
} else if (this.PartType === '基本件') {
|
||||||
|
this.searchTable2()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请选择机床后再查询')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 标准件
|
||||||
|
searchTable0() {
|
||||||
|
let check1, check2, check3
|
||||||
|
this.machineNumberValue ? check1 = 1 : check1 = 0
|
||||||
|
this.groupNumberValue ? check2 = 1 : check2 = 0
|
||||||
|
this.Name ? check3 = 1 : check3 = 0
|
||||||
|
console.log(this.PickingValue, 111)
|
||||||
|
if (this.PickingValue === false) {
|
||||||
|
this.loading0 = true
|
||||||
|
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent0, this.pageSize0, 1).then(response => {
|
||||||
|
this.tableData0 = response.data.rows
|
||||||
|
this.total0 = response.data.total
|
||||||
|
this.loading0 = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading0 = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent0, this.pageSize0, 1).then(response => {
|
||||||
|
this.tableData0 = response.data.rows
|
||||||
|
this.total0 = response.data.total
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 外购件
|
||||||
|
searchTable1: function() {
|
||||||
|
let check1, check2, check3
|
||||||
|
this.machineNumberValue ? check1 = 1 : check1 = 0
|
||||||
|
this.groupNumberValue ? check2 = 1 : check2 = 0
|
||||||
|
this.Name ? check3 = 1 : check3 = 0
|
||||||
|
console.log(this.PickingValue, 111)
|
||||||
|
if (this.PickingValue === false) {
|
||||||
|
this.loading1 = true
|
||||||
|
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent1, this.pageSize1, 2).then(response => {
|
||||||
|
console.log(response, 2)
|
||||||
|
this.tableData1 = response.data.rows
|
||||||
|
this.total1 = response.data.total
|
||||||
|
this.loading1 = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading1 = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent1, this.pageSize1, 2).then(response => {
|
||||||
|
this.tableData1 = response.data.rows
|
||||||
|
this.total1 = response.data.total
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 基本件
|
||||||
|
searchTable2() {
|
||||||
|
let check1, check2, check3
|
||||||
|
this.machineNumberValue ? check1 = 1 : check1 = 0
|
||||||
|
this.groupNumberValue ? check2 = 1 : check2 = 0
|
||||||
|
this.Name ? check3 = 1 : check3 = 0
|
||||||
|
console.log(this.PickingValue, 111)
|
||||||
|
if (this.PickingValue === false) {
|
||||||
|
this.loading2 = true
|
||||||
|
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 0, this.pageCurrent2, this.pageSize2, 3).then(response => {
|
||||||
|
this.tableData2 = response.data.rows
|
||||||
|
this.total2 = response.data.total
|
||||||
|
this.loading2 = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading2 = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, 1, 1, this.pageCurrent2, this.pageSize2, 3).then(response => {
|
||||||
|
this.tableData2 = response.data.rows
|
||||||
|
this.total2 = response.data.total
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 离线采购件
|
||||||
|
searchTable4() {
|
||||||
|
this.listLoading = true
|
||||||
|
this.tableDataBasic = []
|
||||||
|
let check1
|
||||||
|
this.Name ? check1 = 1 : check1 = 0
|
||||||
|
searchPart(check1, this.Name, this.pageCurrent4, this.pageSize4).then(response => {
|
||||||
|
this.tableDataBasic = response.data.rows
|
||||||
|
this.total4 = response.data.total
|
||||||
|
this.listLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTable02(row) {
|
||||||
|
searchListDetailMX(row.领料单流水号, row.基本件流水号, row.标准件和外购件流水号, row.离线采购件流水号).then(response => {
|
||||||
|
this.gridData = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChange0(val) {
|
||||||
|
this.pageSize0 = val
|
||||||
|
this.pageCurrent0 = 1
|
||||||
|
this.searchTable0()
|
||||||
|
},
|
||||||
|
handleCurrentChange0(val) {
|
||||||
|
this.pageCurrent0 = val
|
||||||
|
this.searchTable0()
|
||||||
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
handleSizeChange2(val) {
|
||||||
|
this.pageSize2 = val
|
||||||
|
this.pageCurrent2 = 1
|
||||||
|
this.searchTable2()
|
||||||
|
},
|
||||||
|
handleCurrentChange2(val) {
|
||||||
|
this.pageCurrent2 = val
|
||||||
|
this.searchTable2()
|
||||||
|
},
|
||||||
|
handleSizeChange5(val) {
|
||||||
|
this.pageSize4 = val
|
||||||
|
this.pageCurrent4 = 1
|
||||||
|
this.searchTable4()
|
||||||
|
},
|
||||||
|
handleCurrentChange5(val) {
|
||||||
|
this.pageCurrent4 = val
|
||||||
|
this.searchTable4()
|
||||||
|
},
|
||||||
|
// 查询领料单列表
|
||||||
|
searchList() {
|
||||||
|
let check, isElectrical, check1
|
||||||
|
this.pickingListPeople ? check = 1 : check = 0
|
||||||
|
this.startTime ? check1 = 1 : (check1 = 0, this.startTime = '')
|
||||||
|
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长
|
||||||
|
searchList(this.pageCurrent3, this.pageSize3, check, this.pickingListPeople, isElectrical, check1, this.startTime[0], this.startTime[1]).then(response => {
|
||||||
|
this.pickListTable1 = response.data.rows
|
||||||
|
this.total3 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChange3(val) {
|
||||||
|
this.pageSize3 = val
|
||||||
|
this.pageCurrent3 = 1
|
||||||
|
this.searchList()
|
||||||
|
},
|
||||||
|
handleCurrentChange3(val) {
|
||||||
|
this.pageCurrent3 = val
|
||||||
|
this.searchList()
|
||||||
|
},
|
||||||
|
handleSizeChange4(val) {
|
||||||
|
this.pageSize3 = val
|
||||||
|
this.pageCurrent3 = 1
|
||||||
|
this.searchList()
|
||||||
|
},
|
||||||
|
handleCurrentChange4(val) {
|
||||||
|
this.pageCurrent3 = val
|
||||||
|
this.searchList()
|
||||||
|
},
|
||||||
|
// 创建领料单
|
||||||
|
createList() {
|
||||||
|
if (this.$refs['form1'] !== undefined) {
|
||||||
|
this.$refs['form1'].resetFields()
|
||||||
|
}
|
||||||
|
this.form1.领料人流水号 = ''
|
||||||
|
this.form1.领料单备注 = ''
|
||||||
|
this.createList_disable = false
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
this.groupNumber = []
|
||||||
|
},
|
||||||
|
// 提交创建领料单
|
||||||
|
submitCreateList() {
|
||||||
|
this.createList_disable = true
|
||||||
|
let isElectrical
|
||||||
|
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长
|
||||||
|
createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical, this.form1.机床图号, this.form1.组号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('创建成功')
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
this.searchList()
|
||||||
|
} else { this.$message.error('操作失败') }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 确认领料单
|
||||||
|
checkList(row) {
|
||||||
|
this.$confirm('是否确认领回?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const param = {
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `update 车间装配管理_领料单 set 是否启用 = 0 where 领料单流水号 = ${row.领料单流水号}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request(param).then(res => {
|
||||||
|
if (res.data[0].result === '1') {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.searchList()
|
||||||
|
} else {
|
||||||
|
this.$message.error('操作失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除领料单
|
||||||
|
dropList() {
|
||||||
|
this.$confirm(`确定删除<p style="color: red;display: inline-block"> ${this.pickingListNumberShow}</p> 领料单吗?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
dangerouslyUseHTMLString: true
|
||||||
|
}).then(() => {
|
||||||
|
dropList(this.pickingListNum).then(response => {
|
||||||
|
if (Number(response.data[0].result) === 1) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.listDetailsName = ''
|
||||||
|
this.listDetailsPicnum = ''
|
||||||
|
this.listDetailsSpecifications = ''
|
||||||
|
this.listMachinenum = ''
|
||||||
|
this.pickListTable2 = []
|
||||||
|
this.searchList()
|
||||||
|
} else {
|
||||||
|
this.$message.error('数据占用')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 多选
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val
|
||||||
|
},
|
||||||
|
handleSelectionChange1(val) {
|
||||||
|
this.multipleSelection1 = val
|
||||||
|
},
|
||||||
|
// 选入
|
||||||
|
selectInto() {
|
||||||
|
this.selectInto_disable = true
|
||||||
|
if (this.PartType === '离线采购件') {
|
||||||
|
const materialGroup = []
|
||||||
|
const groupPartGroup = []
|
||||||
|
const numGroup = []
|
||||||
|
this.multipleSelection1.map(v => {
|
||||||
|
materialGroup.push(v.物料流水号)
|
||||||
|
groupPartGroup.push(v.组件零件基本件流水号)
|
||||||
|
numGroup.push(v.领用数量)
|
||||||
|
})
|
||||||
|
if (materialGroup.length === 0) {
|
||||||
|
this.$message.warning('请勾选零件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.pickingListNum || !this.pickingListNumberShow) {
|
||||||
|
this.$message.warning('请选择领料单')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.machineNumberValue) {
|
||||||
|
this.$message.warning('请选择机床')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
IntoMateerial(materialGroup, groupPartGroup, numGroup, this.pickingListNum, this.machineNumberValue).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.searchTable()
|
||||||
|
this.clickList()
|
||||||
|
this.selectInto_disable = false
|
||||||
|
} else {
|
||||||
|
this.$message.error('操作失败')
|
||||||
|
this.selectInto_disable = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const basePartGroup = []
|
||||||
|
const purchasePartGroup = []
|
||||||
|
this.multipleSelection.map(v => {
|
||||||
|
v.基本件流水号 ? basePartGroup.push(v.基本件流水号) : purchasePartGroup.push(v.标准件和外购件流水号)
|
||||||
|
})
|
||||||
|
if (basePartGroup.length === 0 && purchasePartGroup.length === 0) {
|
||||||
|
this.$message.warning('请勾选零件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.pickingListNum || !this.pickingListNumberShow) {
|
||||||
|
this.$message.warning('请选择领料单')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (basePartGroup.length) { // 基本件
|
||||||
|
selectIntoList(basePartGroup, null, this.pickingListNum).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.searchTable()
|
||||||
|
this.clickList()
|
||||||
|
this.selectInto_disable = false
|
||||||
|
} else {
|
||||||
|
this.$message.error('操作失败')
|
||||||
|
this.selectInto_disable = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else { // 标准件外购件
|
||||||
|
selectIntoList(null, purchasePartGroup, this.pickingListNum).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.searchTable()
|
||||||
|
this.clickList()
|
||||||
|
this.selectInto_disable = false
|
||||||
|
} else {
|
||||||
|
this.$message.error('操作失败')
|
||||||
|
this.selectInto_disable = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看领料单明细
|
||||||
|
clickList(row) {
|
||||||
|
this.listDetailsName = ''
|
||||||
|
this.listDetailsPicnum = ''
|
||||||
|
this.listDetailsSpecifications = ''
|
||||||
|
this.listMachinenum = ''
|
||||||
|
row ? this.审批情况 = row.是否审批 : this.审批情况
|
||||||
|
row ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
|
||||||
|
row ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
|
||||||
|
row ? this.peopleName = row.姓名 : this.peopleName
|
||||||
|
this.listDetailsloading = true
|
||||||
|
searchListDetail(this.pickingListNum).then(res => {
|
||||||
|
this.pickListTable2 = []
|
||||||
|
this.pickListTable2 = res.data
|
||||||
|
this.listDetailsloading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.listDetailsloading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchMX(row) {
|
||||||
|
this.ListMX = row.领料单明细流水号
|
||||||
|
this.listDetailsName = row.名称
|
||||||
|
this.listDetailsPicnum = row.图号或型号
|
||||||
|
this.listDetailsSpecifications = row.规格 ? row.规格 : '--'
|
||||||
|
this.listMachinenum = row.机床图号
|
||||||
|
console.log(this.listDetailsName, this.listDetailsPicnum, this.listDetailsSpecifications, this.listMachinenum, 8989)
|
||||||
|
},
|
||||||
|
// 删除领料单明细
|
||||||
|
dropListDetail() {
|
||||||
|
if (this.listDetailsName) {
|
||||||
|
//
|
||||||
|
// this.listDetailsSpecifications = row.规格 ? row.规格 : '--'
|
||||||
|
// this.listMachinenum = row.机床图号
|
||||||
|
this.$confirm(`确定删除</br> <p style="color: red;display: inline-block"> 领料单:${this.listDetailsName} ${' '}图号或型号:${this.listDetailsPicnum}</p><p style="color: red;display: inline-block">规格:${this.listDetailsSpecifications}${' '}机床图号:${this.listMachinenum} </p> 的明细吗?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
dangerouslyUseHTMLString: true
|
||||||
|
}).then(() => {
|
||||||
|
dropListDetail(this.ListMX).then(response => {
|
||||||
|
if (Number(response.data[0].result) === 1) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.searchTable()
|
||||||
|
this.clickList()
|
||||||
|
} else {
|
||||||
|
this.$message.error('已领取,不可删除')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message('请先选择领料单')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-select{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
.el-input{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
margin: 10px 0 10px 10px;
|
||||||
|
}
|
||||||
|
.el-tag{
|
||||||
|
margin: 0
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.el-table .shenpi-row {
|
||||||
|
background: #9BD7FC !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user