更新
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
"vue": "2.5.17",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-direction-key": "^1.0.5",
|
||||
"vue-router": "3.0.1",
|
||||
"vue-router": "^3.0.7",
|
||||
"vuex": "3.0.1",
|
||||
"xlsx": "^0.14.0",
|
||||
"xlsx-style": "^0.8.13"
|
||||
|
||||
@@ -75,7 +75,7 @@ export function MachineToolStateUpdate(machineNumberValue, check) {
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
type: '2',
|
||||
name: 'PDM_机床名称_机床状态_修改数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&装配状态=' + check
|
||||
}
|
||||
@@ -90,7 +90,7 @@ export function DebugStatusUpdate(machineNumberValue, check) {
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
type: '2',
|
||||
name: 'PDM_机床名称_调试状态_修改数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&调试状态=' + check
|
||||
}
|
||||
|
||||
83
src/api/Assembly/AssemblyMes.js
Normal file
83
src/api/Assembly/AssemblyMes.js
Normal file
@@ -0,0 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
// 初始化机床项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间装配管理_装配MES_机床编号_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable(check, machineNumberValue, check1, startTime, endTime, check2, stateValue, check3, workerValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间管理_装配任务_MES_查询数据',
|
||||
param: '机床流水号_check=' + check + '&机床流水号=' + machineNumberValue + '&时间段_check=' + check1 + '&开始时间=' + startTime + '&结束时间=' + endTime + '&状态_check=' + check2 + '&状态=' + stateValue + '&人员_check=' + check3 + '&人员=' + workerValue
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取分配后装配人员
|
||||
export function searchName(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间管理_装配计划_装配工_查询数据',
|
||||
param: '计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function ComponentStateUpdate() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间管理_工作计划_执行计划',
|
||||
param: '计划流水号=' + arguments[0] + '&是否工作=' + arguments[1] + '&考勤编号=' + arguments[2]
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submitSuspend() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间管理_工作计划_暂停计划',
|
||||
param: '计划流水号=' + arguments[0] + '&是否暂停=' + arguments[1]
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取装配人员
|
||||
export function searchPeople() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=11'
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -28,6 +28,19 @@ export function searchTable(machineNumberValue) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable2(machineNumberValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间管理_装配计划_分配后_查询数据',
|
||||
param: '机床流水号=' + machineNumberValue
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deletedata(num) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -41,6 +54,19 @@ export function deletedata(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteTask(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间装配管理_分配后任务_删除数据',
|
||||
param: '计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getMachineNames(num) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -77,7 +103,7 @@ export function selectParts(check1, stepNumber, check2, num) {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_车间组件完成情况_查询数据',
|
||||
name: '车间生产管理工艺_车间组件完成情况_查询数据_装配',
|
||||
param: '组件流水号_check=' + check1 + '&组件流水号=' + stepNumber + '&工艺计划流水号_check=' + check2 + '&工艺计划流水号=' + num
|
||||
}
|
||||
})
|
||||
@@ -95,3 +121,57 @@ export function addData(num, name, type) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取装配人员
|
||||
export function searchPeople() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=11'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取分配后装配人员
|
||||
export function searchName(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间管理_装配计划_装配工_查询数据',
|
||||
param: '计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submitPeople(num, people) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间装配管理_分配任务_循环执行',
|
||||
param: '计划流水号=' + num + '&人员编号组=' + people
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submitOutPeople(num, people) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间装配管理_移出装配工_循环执行',
|
||||
param: '计划流水号=' + num + '&任务分配流水号组=' + people
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ export function addTest(num) {
|
||||
})
|
||||
}
|
||||
// 查询 检测项明细
|
||||
export function addTesting(num, num1) {
|
||||
export function addTesting(num, num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -118,7 +118,7 @@ export function addTesting(num, num1) {
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '质检管理_装配质检_检测项明细_增加数据',
|
||||
param: '检测项流水号=' + num + '&检测项明细=' + num1
|
||||
param: '检测项流水号=' + num + '&检测项明细=' + num1 + '&基准值=' + num2 + '&公差=' + num3
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export function groupSelect(machineValue) {
|
||||
})
|
||||
}
|
||||
|
||||
export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, orderName, order, orderassignmentTypeValue_check, assignmentTypeValue, check_time, outTime1, outTime2) {
|
||||
export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, orderName, order, orderassignmentTypeValue_check, assignmentTypeValue, check_time, outTime1, outTime2, pageSize, pageCurrent) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -49,8 +49,8 @@ export function basicPartsData(machine_check, machine, group_check, group, Model
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '零件分配查询_查询',
|
||||
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}&排序名称=${orderName}&排序顺序=${order}&分配类型_check=${orderassignmentTypeValue_check}&分配类型=${assignmentTypeValue}&分配时间_check=${check_time}&分配开始时间=${outTime1}&分配结束时间=${outTime2}`
|
||||
// Pagination: pageCurrent + '&' + pageSize
|
||||
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}&排序名称=${orderName}&排序顺序=${order}&分配类型_check=${orderassignmentTypeValue_check}&分配类型=${assignmentTypeValue}&分配时间_check=${check_time}&分配开始时间=${outTime1}&分配结束时间=${outTime2}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -59,3 +59,17 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
|
||||
}
|
||||
})
|
||||
}
|
||||
// 执行审批
|
||||
export function cancel(...data) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '采购管理_发票结算申请单_撤回审批',
|
||||
param: `发票结算申请单流水号=${data[0]}&审批代号=${data[1]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ export function deleteData(num) {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '库存管理_物料主文件_基本_删除数据',
|
||||
name: '库存管理_物料主文件_基本_采购部_删除数据',
|
||||
param: '物料流水号=' + num
|
||||
}
|
||||
})
|
||||
|
||||
@@ -30,3 +30,16 @@ export function searchTable1(...group) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function cancel(...group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间采购管理_发票结算申请单_撤回审批',
|
||||
param: `发票结算申请单流水号=${group[0]}&审批代号=${group[1]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -85,3 +85,17 @@ export function Disable(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 合同审批撤回
|
||||
export function cancle(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '采购管理_合同审批撤回_修改数据',
|
||||
param: '采购合同流水号=' + num + '&请购单流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -57,3 +57,17 @@ export function searchSupplier() {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询供应商
|
||||
export function cancel(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间采购管理_采购合同_审批撤回_修改数据',
|
||||
param: '采购合同请款流水号=' + num + '&审批_付款状态=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BIN
src/assets/gaojing.png
Normal file
BIN
src/assets/gaojing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
664
src/views/Assembly/AssemblyMes/index.vue
Normal file
664
src/views/Assembly/AssemblyMes/index.vue
Normal file
@@ -0,0 +1,664 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<el-row>
|
||||
<div style="height: 80px">
|
||||
<el-row>
|
||||
<el-col style="width: 92px">
|
||||
<img src="@/assets/gaojing.png" style="height: 80px">
|
||||
</el-col>
|
||||
<el-col style="width: 1076px">
|
||||
<div style="margin-top: 20px">
|
||||
<span style="margin-left: 35%;font-size: 38px;font-weight: bold ">装 配 任 务 管 理</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-notebook-2"> 装配任务</i></span>
|
||||
<el-row>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()">
|
||||
<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-date-picker
|
||||
v-model="startTime"
|
||||
:picker-options="pickerOptions1"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px;margin-top: 5px"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
@change="changeTime"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
:picker-options="pickerOptions"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
@change="changeTime1"/>
|
||||
<el-select v-model="stateValue" filterable placeholder="状态" size="small" style="margin-left: 10px" clearable>
|
||||
<el-option
|
||||
v-for="item in stateGroup"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable()">查询</el-button>
|
||||
<span style="margin-right: 3%;float: right;margin-top: 15px;color: rgb(42,113,203)">{{ nowTime }}</span>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 5px" height="720px">
|
||||
<el-table-column label="状态" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配时间" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床组号" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件名称" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件数" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部件数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装配工" align="center" width="210px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配工 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始装配" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.开始时间">
|
||||
{{ scope.row.开始时间 ? scope.row.开始时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="text" size="mini" icon="el-icon-setting" @click="AssemblyStart(scope.row)">开始装配</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="暂停装配" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="Number(scope.row.是否暂停)===0">
|
||||
<el-button :disabled="Number(scope.row.是否工作) === 0 || Number(scope.row.是否工作) === 2" type="text" size="mini" icon="el-icon-map-location" @click="AssemblySuspend(scope.row)">暂停装配</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="text" size="mini" icon="" @click="AssemblyRecovery(scope.row)">恢复装配</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成装配" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.结束时间">
|
||||
{{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button :disabled="Number(scope.row.是否工作) === 0 || Number(scope.row.是否暂停)===1" type="text" size="mini" icon="el-icon-receiving" @click="AssemblyFinish(scope.row)">完成装配</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-search"> 装配查询</i></span>
|
||||
<el-row>
|
||||
<el-select v-model="machineNumberValue1" filterable placeholder="机床编号" size="small" clearable @change="searchTable1()">
|
||||
<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-date-picker
|
||||
v-model="startTime1"
|
||||
:picker-options="pickerOptions3"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px;margin-top: 5px"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
@change="changeTime2"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime1"
|
||||
:picker-options="pickerOptions2"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
@change="changeTime3"/>
|
||||
<el-select v-model="workerValue" filterable placeholder="装配工" size="small" style="margin-left: 10px" clearable>
|
||||
<el-option
|
||||
v-for="item in workerGroup"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable1()">查询</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table v-loading="loading1" :data="tableData1" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 5px" height="720px">
|
||||
<el-table-column label="状态" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配时间" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床组号" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件名称" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件数" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部件数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总数量" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装配工" align="center" width="200px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配工 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始装配" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始时间 ? scope.row.开始时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="暂停装配" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.暂停开始时间 ? scope.row.暂停开始时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="暂停装配" align="center" width="140px">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.暂停原因 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="完成装配" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisible"
|
||||
:title="title"
|
||||
center
|
||||
width="300px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
||||
<el-form-item label="考勤编号" prop="考勤编号">
|
||||
<el-input v-model="form.考勤编号" size="small" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title==='装配开始'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitStart">确定</el-button>
|
||||
<el-button
|
||||
v-show="title==='装配完成'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitFinish">确定</el-button>
|
||||
<el-button
|
||||
v-show="title==='暂停装配'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitSuspend">确定</el-button>
|
||||
<el-button
|
||||
v-show="title==='恢复装配'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitRecovery">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchTable, searchName, ComponentStateUpdate, submitSuspend, searchPeople } from '@/api/Assembly/AssemblyMes'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: '0',
|
||||
machineNumber: [],
|
||||
machineNumberValue: '',
|
||||
machineNumberValue1: '',
|
||||
dialogFormVisible: false,
|
||||
planValue: '',
|
||||
people: [],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
startTime1: '',
|
||||
endTime1: '',
|
||||
timer: '',
|
||||
workerValue: '',
|
||||
workerGroup: [],
|
||||
stateGroup: [{
|
||||
value: 1,
|
||||
label: '未装配'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '装配中'
|
||||
}, {
|
||||
value: 3,
|
||||
label: '暂停'
|
||||
}, {
|
||||
value: 4,
|
||||
label: '完成'
|
||||
}],
|
||||
stateValue: '',
|
||||
assemblyPeople: [],
|
||||
assemblyPeopleValue: '',
|
||||
pickerOptions1: {},
|
||||
pickerOptions: {},
|
||||
pickerOptions2: {},
|
||||
pickerOptions3: {},
|
||||
title: '',
|
||||
form: {
|
||||
考勤编号: ''
|
||||
},
|
||||
rules: {
|
||||
考勤编号: [{ required: true, message: '请输入考勤编号' }]
|
||||
},
|
||||
loading: false,
|
||||
loading1: false,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
nowTime: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.searchPeople()
|
||||
this.initProject()
|
||||
this.getTime()
|
||||
this.timer = setInterval(this.getTime, 1000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
zeroFill(i) {
|
||||
if (i >= 0 && i <= 9) {
|
||||
return '0' + i
|
||||
} else {
|
||||
return i
|
||||
}
|
||||
},
|
||||
getTime() {
|
||||
var date = new Date()
|
||||
var month = this.zeroFill(date.getMonth() + 1)
|
||||
var day = this.zeroFill(date.getDate())
|
||||
var hour = this.zeroFill(date.getHours())
|
||||
var minute = this.zeroFill(date.getMinutes())
|
||||
var second = this.zeroFill(date.getSeconds())
|
||||
this.nowTime = date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||
},
|
||||
searchPeople() {
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.workerGroup.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTime() {
|
||||
this.pickerOptions = Object.assign({}, this.pickerOptions, {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() < Date.parse(this.startTime) - 86400000
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTime1() {
|
||||
this.pickerOptions1 = Object.assign({}, this.pickerOptions1, {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() >= Date.parse(this.endTime)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTime2() {
|
||||
this.pickerOptions2 = Object.assign({}, this.pickerOptions2, {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() <= Date.parse(this.startTime1)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTime3() {
|
||||
this.pickerOptions3 = Object.assign({}, this.pickerOptions3, {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() >= Date.parse(this.endTime1)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
if (this.activeName === '0') {
|
||||
this.machineNumberValue = ''
|
||||
this.startTime = ''
|
||||
this.endTime = ''
|
||||
this.workerValue = ''
|
||||
this.tableData1 = []
|
||||
}
|
||||
},
|
||||
initProject() {
|
||||
initProject().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].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
let check, check1, check2
|
||||
this.machineNumberValue ? check = 1 : check = 0
|
||||
this.startTime && this.endTime ? check1 = 1 : check1 = 0
|
||||
this.stateValue ? check2 = 1 : check2 = 0
|
||||
searchTable(check, this.machineNumberValue, check1, this.startTime, this.endTime, check2, this.stateValue, 0, '').then(response => {
|
||||
this.tableData = response.data
|
||||
}).then(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
let check, check1, check3
|
||||
this.machineNumberValue1 ? check = 1 : check = 0
|
||||
this.startTime1 && this.endTime1 ? check1 = 1 : check1 = 0
|
||||
this.workerValue ? check3 = 1 : check3 = 0
|
||||
searchTable(check, this.machineNumberValue1, check1, this.startTime1, this.endTime1, 0, '', check3, this.workerValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
AssemblyStart(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '装配开始'
|
||||
this.planValue = row.计划流水号
|
||||
this.people = []
|
||||
searchName(this.planValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push(Number(response.data[i].考勤编号))
|
||||
}
|
||||
})
|
||||
},
|
||||
submitStart() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.people.indexOf(Number(this.form.考勤编号)) !== -1) {
|
||||
ComponentStateUpdate(this.planValue, 1, this.form.考勤编号).then(response => {
|
||||
if (response.data.result !== '0') {
|
||||
this.$message.success('装配开始')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('装配开始失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入正确的考勤编号')
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
AssemblyFinish(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '装配完成'
|
||||
this.planValue = row.计划流水号
|
||||
this.people = []
|
||||
searchName(this.planValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push(Number(response.data[i].考勤编号))
|
||||
}
|
||||
})
|
||||
},
|
||||
submitFinish() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.people.indexOf(Number(this.form.考勤编号)) !== -1) {
|
||||
ComponentStateUpdate(this.planValue, 2, this.form.考勤编号).then(response => {
|
||||
if (response.data[0].result !== '0') {
|
||||
this.$message.success('装配完成')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('装配完成失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入正确的考勤编号')
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
AssemblySuspend(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '暂停装配'
|
||||
this.planValue = row.计划流水号
|
||||
this.people = []
|
||||
searchName(this.planValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push(Number(response.data[i].考勤编号))
|
||||
}
|
||||
})
|
||||
},
|
||||
submitSuspend() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.people.indexOf(Number(this.form.考勤编号)) !== -1) {
|
||||
submitSuspend(this.planValue, 1).then(response => {
|
||||
if (response.data[0].result !== '0') {
|
||||
this.$message.success('暂停成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('暂停失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入正确的考勤编号')
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
AssemblyRecovery(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '恢复装配'
|
||||
this.planValue = row.计划流水号
|
||||
this.people = []
|
||||
searchName(this.planValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.people.push(Number(response.data[i].考勤编号))
|
||||
}
|
||||
})
|
||||
},
|
||||
submitRecovery() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.people.indexOf(Number(this.form.考勤编号)) !== -1) {
|
||||
submitSuspend(this.planValue, 0).then(response => {
|
||||
if (response.data[0].result !== '0') {
|
||||
this.$message.success('恢复成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('恢复失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入正确的考勤编号')
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
tableData1ClassName({ row, rowIndex }) {
|
||||
if (Number(row.是否工作) === 0) {
|
||||
return 'weizhuangpei'
|
||||
} else if (Number(row.是否工作) === 1 && Number(row.是否暂停) === 0) {
|
||||
return 'zhuangpeizhong'
|
||||
} else if (Number(row.是否工作) === 1 && Number(row.是否暂停) === 1) {
|
||||
return 'zanting'
|
||||
} else if (Number(row.是否工作) === 2) {
|
||||
return 'wancheng'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.main {
|
||||
width: 1260px;
|
||||
height: 855px;
|
||||
background-color: rgb(230,233,238);
|
||||
}
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
text-align: right;
|
||||
}
|
||||
>>>.el-dialog--center .el-dialog__body {
|
||||
text-align: initial;
|
||||
padding: 20px 30px 20px
|
||||
}
|
||||
>>>.el-dialog__header {
|
||||
padding: 20px 20px 0px;
|
||||
}
|
||||
>>>.el-dialog__footer {
|
||||
padding: 0px 20px 20px;
|
||||
/*text-align: right;*/
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
>>>.el-form-item {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
.el-tabs--border-card>.el-tabs__header {
|
||||
padding: 0 0 0 5px !important;
|
||||
background-color: white !important;
|
||||
border-bottom: 1px solid #e4e7ed !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {
|
||||
color: #fff !important;
|
||||
background-color: rgb(19,45,113) !important;
|
||||
/*background-color: #1b55a0 !important;*/
|
||||
}
|
||||
.el-tabs--border-card>.el-tabs__header .el-tabs__item {
|
||||
color: #fff !important;
|
||||
background-color: rgb(127,172,237) !important;
|
||||
}
|
||||
.el-tabs--border-card>.el-tabs__content {
|
||||
padding: 5px !important;
|
||||
background-color: white !important;
|
||||
}
|
||||
.el-tabs--border-card {
|
||||
background: #fff !important;
|
||||
border: 0px solid #dcdfe6 !important;
|
||||
-webkit-box-shadow: 0 0px 0px 0 rgba(0,0,0,.12), 0 0 0px 0 rgba(0,0,0,.04) !important;
|
||||
box-shadow: 0 0px 0px 0 rgba(0,0,0,.12), 0 0 0px 0 rgba(0,0,0,.04) !important;
|
||||
}
|
||||
th {
|
||||
background: rgb(42,113,203) !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
.el-table__body tr {
|
||||
height: 40px !important;;
|
||||
}
|
||||
.el-table {
|
||||
color: black !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.weizhuangpei {
|
||||
background: #e9c5d1 !important;
|
||||
}
|
||||
.zhuangpeizhong {
|
||||
background: #E6EAEE !important;
|
||||
}
|
||||
.zanting {
|
||||
background: #D8E5F6 !important;
|
||||
}
|
||||
.wancheng {
|
||||
background: #c6d7b3 !important;
|
||||
}
|
||||
</style>
|
||||
@@ -15,17 +15,16 @@
|
||||
</el-select>
|
||||
<span>机床数量:{{ machineNum }}</span>
|
||||
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTaskName()">增加装配任务</el-button>
|
||||
<el-button type="danger" plain size="small" icon="el-icon-delete" style="margin-left: 300px" @click="deleteData()">删除</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="width: 52%; float: left">
|
||||
<el-table v-loading="loading" :data="tableData" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
|
||||
<el-table-column label="机床组号" align="center" width="140px">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
|
||||
<el-table-column label="机床组号" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件名称" align="center" width="100px">
|
||||
<el-table-column label="部件名称" align="center" width="90px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部件名称 }}
|
||||
</template>
|
||||
@@ -35,90 +34,80 @@
|
||||
{{ scope.row.部件数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="总数量" align="center" width="65px">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.机床数量 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="自制件入库" align="center" width="95px">
|
||||
<el-table-column label="总数量" align="center" width="65px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="自制件" align="center" width="65px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.自制件入库率 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外购件入库" align="center" width="95px">
|
||||
<el-table-column label="外购件" align="center" width="65px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外购件入库率 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成组配套" align="center" width="90px">
|
||||
<el-table-column label="成组配套" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openDialog(scope.row)">查看详情</el-button>
|
||||
<el-button :disabled="!scope.row.组件流水号" type="text" size="mini" @click="openDialog(scope.row)">查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配时间" align="center" width="90px">
|
||||
<el-table-column label="装配工" align="center" width="125px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配工 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配时间" align="center" width="85px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="90px">
|
||||
<el-table-column label="操作" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="openPeople(scope.row)">分配</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/>
|
||||
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="openPeople(scope.row)">分配</el-button>
|
||||
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card style="width: 38%; float: left">
|
||||
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
|
||||
<el-table-column label="状态" align="center" width="90px">
|
||||
<el-card style="width: 39%; float: left">
|
||||
<el-table :data="tableData2" :row-class-name="tableData1ClassName" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
|
||||
<el-table-column label="状态" align="center" width="60px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
{{ scope.row.状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部件" align="center" width="120px">
|
||||
<el-table-column label="部件名称" align="center" width="110px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装配人" align="center" width="70px" prop="计划工时">
|
||||
<el-table-column label="装配工" align="center" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.计划工时 }}
|
||||
</template>
|
||||
{{ scope.row.装配工 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装配开始" align="center" width="110px">
|
||||
<el-table-column label="装配开始" align="center" width="85px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
|
||||
{{ scope.row.开始时间 ? scope.row.开始时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装配暂停" align="center" width="110px">
|
||||
<el-table-column label="装配暂停" align="center" width="85px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
|
||||
{{ scope.row.暂停开始时间 ? scope.row.暂停开始时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装配结束" align="center" width="110px">
|
||||
<el-table-column label="装配结束" align="center" width="85px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
|
||||
{{ scope.row.结束时间 ? scope.row.结束时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" size="mini" @click="outPeople(scope.row)">移出</el-button>
|
||||
<el-button :disabled="Number(scope.row.是否工作) !== 0" type="text" icon="el-icon-delete" size="mini" @click="deleteTask(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -143,25 +132,97 @@
|
||||
:visible.sync="dialogFormVisible1"
|
||||
title="装配任务"
|
||||
center
|
||||
width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
|
||||
width="300px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
||||
<el-form-item label="任务名称" prop="任务名称">
|
||||
<el-input v-model="form.任务名称" size="small" style="width: 150px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
:disabled="addPurchaseOrder_disable"
|
||||
:disabled="addTaskName_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitTaskName">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisible2"
|
||||
title="分配装配任务"
|
||||
center
|
||||
width="340px">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="List"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="selectable"
|
||||
align="center"
|
||||
type="selection"
|
||||
width="50"/>
|
||||
<el-table-column align="center" label="装配工" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
:disabled="addPeople_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitPeople">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:visible.sync="dialogFormVisible3"
|
||||
title="移出装配工"
|
||||
center
|
||||
width="340px">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="List1"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange1">
|
||||
<el-table-column
|
||||
align="center"
|
||||
type="selection"
|
||||
width="50"/>
|
||||
<el-table-column align="center" label="装配工" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
:disabled="outPeople_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitOutPeople">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, searchTable, getMachineNames, selectParts, addData, deletedata } from '@/api/Assembly/AssemblyTaskAssignment'
|
||||
<script>import { initProject, searchTable, getMachineNames, selectParts, addData, deletedata, searchPeople, submitPeople, searchTable2, searchName, submitOutPeople, deleteTask } from '@/api/Assembly/AssemblyTaskAssignment'
|
||||
// import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
@@ -171,15 +232,25 @@ export default {
|
||||
machineNum: '',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
groupNumberValue: '',
|
||||
groupNum: [],
|
||||
loading: false,
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
hadFile: [],
|
||||
option: [],
|
||||
plan: '',
|
||||
addPurchaseOrder_disable: false,
|
||||
List: [],
|
||||
List1: [],
|
||||
Name: [],
|
||||
peopleGroup: [],
|
||||
outPeopleGroup: [],
|
||||
multipleSelection: [],
|
||||
multipleSelection1: [],
|
||||
addTaskName_disable: false,
|
||||
addPeople_disable: false,
|
||||
outPeople_disable: false,
|
||||
form: {
|
||||
任务名称: ''
|
||||
},
|
||||
@@ -189,9 +260,9 @@ export default {
|
||||
departmentData: [] // 树状数据
|
||||
}
|
||||
},
|
||||
// created() {
|
||||
// this.searchTable1()
|
||||
// },
|
||||
created() {
|
||||
this.searchPeople()
|
||||
},
|
||||
mounted() {
|
||||
this.initProject()
|
||||
},
|
||||
@@ -207,11 +278,19 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
searchPeople() {
|
||||
searchPeople().then(response => {
|
||||
this.List = response.data
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
getMachineNames(this.machineNumberValue).then(response => {
|
||||
this.machineNum = response.data[0].机床数量
|
||||
})
|
||||
searchTable2(this.machineNumberValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchTable(this.machineNumberValue).then(response => {
|
||||
this.tableData = response.data
|
||||
}).then(() => {
|
||||
@@ -249,26 +328,102 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
openPeople(row) {},
|
||||
openPeople(row) {
|
||||
this.Name = []
|
||||
searchName(row.计划流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Name.push(Number(response.data[i].考勤编号))
|
||||
}
|
||||
})
|
||||
this.searchPeople()
|
||||
this.addPeople_disable = false
|
||||
this.dialogFormVisible2 = true
|
||||
this.groupNumberValue = row.计划流水号
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
console.log(this.Name.indexOf(Number(row.考勤编号)))
|
||||
return this.Name.indexOf(Number(row.考勤编号)) === -1 // 未采购&&确认物料修改
|
||||
},
|
||||
submitPeople() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请选择装配工')
|
||||
} else {
|
||||
this.peopleGroup = []
|
||||
this.addPeople_disable = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
this.peopleGroup.push(this.multipleSelection[i].人员编号)
|
||||
}
|
||||
submitPeople(this.groupNumberValue, this.peopleGroup).then(response => {
|
||||
if (response.data[0].result !== '0') {
|
||||
this.$message.success('分配成功')
|
||||
this.dialogFormVisible2 = false
|
||||
this.multipleSelection = []
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('分配失败')
|
||||
this.addPeople_disable = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
outPeople(row) {
|
||||
this.outPeople_disable = false
|
||||
this.dialogFormVisible3 = true
|
||||
this.groupNumberValue = row.计划流水号
|
||||
searchName(this.groupNumberValue).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
handleSelectionChange1(val) {
|
||||
this.multipleSelection1 = val
|
||||
},
|
||||
submitOutPeople() {
|
||||
if (this.multipleSelection1.length === 0) {
|
||||
this.$message.warning('请选择装配工')
|
||||
} else {
|
||||
this.outPeopleGroup = []
|
||||
this.outPeople_disable = true
|
||||
for (let i = 0; i < this.multipleSelection1.length; i++) {
|
||||
this.outPeopleGroup.push(this.multipleSelection1[i].任务分配流水号)
|
||||
}
|
||||
submitOutPeople(this.groupNumberValue, this.outPeopleGroup).then(response => {
|
||||
if (response.data[0].result !== '0') {
|
||||
this.$message.success('移出成功')
|
||||
this.dialogFormVisible3 = false
|
||||
this.searchTable()
|
||||
this.multipleSelection1 = []
|
||||
} else {
|
||||
this.$message.error('移出失败')
|
||||
this.outPeople_disable = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
addTaskName() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.任务名称 = ''
|
||||
this.addPurchaseOrder_disable = false
|
||||
this.addTaskName_disable = false
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
submitTaskName() {
|
||||
if (this.machineNumberValue) {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.addPurchaseOrder_disable = true
|
||||
this.addTaskName_disable = true
|
||||
addData(this.machineNumberValue, this.form.任务名称, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建装配任务成功')
|
||||
this.searchTable()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('新建装配任务失败') }
|
||||
} else {
|
||||
this.$message.error('新建装配任务失败')
|
||||
this.addTaskName_disable = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
@@ -296,6 +451,36 @@ export default {
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
deleteTask(row) {
|
||||
this.$confirm('确认删除该分配任务', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteTask(row.计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
tableData1ClassName({ row, rowIndex }) {
|
||||
if (Number(row.是否工作) === 0 && row.分配时间) {
|
||||
return 'weizhuangpei'
|
||||
} else if (Number(row.是否工作) === 1 && Number(row.是否暂停) === 0) {
|
||||
return 'zhuangpeizhong'
|
||||
} else if (Number(row.是否工作) === 1 && Number(row.是否暂停) === 1) {
|
||||
return 'zanting'
|
||||
} else if (Number(row.是否工作) === 2) {
|
||||
return 'wancheng'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -345,3 +530,17 @@ export default {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.weizhuangpei {
|
||||
background: #e9c5d1 !important;
|
||||
}
|
||||
.zhuangpeizhong {
|
||||
background: #E6EAEE !important;
|
||||
}
|
||||
.zanting {
|
||||
background: #D8E5F6 !important;
|
||||
}
|
||||
.wancheng {
|
||||
background: #c6d7b3 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -193,6 +193,16 @@
|
||||
{{ scope.row.检测项明细 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="基准值" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.基准值 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="公差" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.公差 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -229,6 +239,12 @@
|
||||
<el-form-item v-show="title==='增加检测项明细'" label="检测项明细" prop="检测项明细">
|
||||
<el-input v-model="Testing" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加检测项明细'" label="基准值" prop="基准值">
|
||||
<el-input-number v-model="ReferenceValue" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="title==='增加检测项明细'" label="公差" prop="公差">
|
||||
<el-input v-model="tolerance" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
@@ -255,6 +271,8 @@ export default {
|
||||
tableData6: [],
|
||||
Reasons: '',
|
||||
ReasonsValue: '',
|
||||
ReferenceValue: '',
|
||||
tolerance: '',
|
||||
Handle: '',
|
||||
HandleValue: '',
|
||||
Size: '',
|
||||
@@ -414,7 +432,7 @@ export default {
|
||||
})
|
||||
} else if (this.title === '增加检测项明细') {
|
||||
if (this.value1) {
|
||||
addTesting(this.value1, this.Testing).then(response => {
|
||||
addTesting(this.value1, this.Testing, this.ReferenceValue, this.tolerance).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组">
|
||||
<el-select v-model="NumValue" filterable size="small" style="margin-bottom:10px;width: 180px" placeholder="分组" @change="total = 0;pageSize = 10;pageList = 1;getTable()">
|
||||
<el-select v-model="NumValue" filterable size="small" style="margin-bottom:10px;width: 180px" placeholder="分组" @change="total = 0;pageSize = 20;pageList = 1;getTable()">
|
||||
<el-option
|
||||
v-for="item in Num"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left:10px" plain @click="total = 0;pageSize = 10000;pageList = 1;getTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left:10px" plain @click="total = 0;pageSize = 20;pageList = 1;getTable()">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
@@ -168,18 +168,19 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
<span style="font-size: 5px">共{{ totalnumber }}条信息,选择{{ gouxuan }}条</span>
|
||||
<div class="block" style="margin-top: 0px;">
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 10000]"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="width:50%;display:inline-block;"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
style="width:50%;display:inline-block;margin-left: 10%"
|
||||
layout="sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<div class="block" style="margin-top: 0px;">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="将不同组号中相同图号的零件合并" placement="top">
|
||||
<el-checkbox v-model="checked_hebing" style="margin-top:10px;margin-right:10px">合并生产</el-checkbox>
|
||||
</el-tooltip>
|
||||
@@ -261,7 +262,7 @@
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage3"
|
||||
:page-sizes="[10, 20, 30, 10000]"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -495,6 +496,7 @@ export default {
|
||||
date: '',
|
||||
a: false,
|
||||
multipleSelection: [],
|
||||
multipleSelection_finish: [],
|
||||
checked_baitu: false,
|
||||
checked_gaonandu: false,
|
||||
tableData: [], // 表1
|
||||
@@ -509,11 +511,11 @@ export default {
|
||||
gongyijihua: '',
|
||||
radio: 0, // 第一组
|
||||
total: 0, // 总条数
|
||||
pageSize: 10000, // 每页显示条数
|
||||
pageSize: 20, // 每页显示条数
|
||||
pageList: 1, // 后台获取页
|
||||
currentPage: 1, // 显示当前页
|
||||
total3: 0, // 总条数
|
||||
pageSize3: 10000, // 每页显示条数
|
||||
pageSize3: 20, // 每页显示条数
|
||||
pageList3: 1, // 后台获取页
|
||||
currentPage3: 1, // 显示当前页
|
||||
listLoading: false,
|
||||
@@ -745,6 +747,7 @@ export default {
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
console.log(this.multipleSelection, 222)
|
||||
this.gouxuan = val.length
|
||||
},
|
||||
handleEditNumber(index, row) {
|
||||
@@ -871,7 +874,7 @@ export default {
|
||||
})
|
||||
}
|
||||
this.total = 0
|
||||
this.pageSize = 10000
|
||||
this.pageSize = 20
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
@@ -936,7 +939,7 @@ export default {
|
||||
this.checked_baitu = false
|
||||
this.checked_gaonandu = false
|
||||
this.total = 0
|
||||
this.pageSize = 10000
|
||||
this.pageSize = 20
|
||||
this.pageList = 1
|
||||
this.shijiancuo1 = 0
|
||||
this.shijiancuo = 0
|
||||
@@ -996,7 +999,7 @@ export default {
|
||||
var that = this
|
||||
setTimeout(function() {
|
||||
that.production_Loading = false
|
||||
}, 5000)
|
||||
}, 3000)
|
||||
this.result = 0
|
||||
this.UrgentItem = 0
|
||||
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
|
||||
@@ -1017,23 +1020,26 @@ export default {
|
||||
if (this.checked_UrgentItem === true) {
|
||||
this.UrgentItem = 1
|
||||
}
|
||||
this.multipleSelection_finish = this.multipleSelection
|
||||
console.log(this.multipleSelection, this.multipleSelection_finish, 111)
|
||||
this.multipleSelection = []
|
||||
if (this.checked_hebing === true) {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
for (let i = 0; i < this.multipleSelection_finish.length; i++) {
|
||||
if (this.multipleSelection_finish[i].checked_waixie === false) {
|
||||
this.multipleSelection_finish[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
this.multipleSelection_finish[i].checked_waixie = 2
|
||||
}
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
if (this.multipleSelection_finish[i].checked_zhaoji === false) {
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
if (this.multipleSelection_finish[i].checked_dailiao === true) {
|
||||
this.multipleSelection_finish[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
this.multipleSelection_finish[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
@@ -1045,9 +1051,9 @@ export default {
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production2(this.multipleSelection[i].零件图号, this.multipleSelection[i].规格, this.toolNumValue, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection[i].是否加急件).then(response => {
|
||||
production2(this.multipleSelection_finish[i].零件图号, this.multipleSelection_finish[i].规格, this.toolNumValue, this.multipleSelection_finish[i].数据类型, this.multipleSelection_finish[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection_finish[i].checked_waixie, this.multipleSelection_finish[i].checked_dailiao, this.id, this.multipleSelection_finish[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection_finish[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection_finish[i].是否加急件).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
if (this.result === this.multipleSelection_finish.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
@@ -1067,21 +1073,21 @@ export default {
|
||||
}
|
||||
} else {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
for (let i = 0; i < this.multipleSelection_finish.length; i++) {
|
||||
if (this.multipleSelection_finish[i].checked_waixie === false) {
|
||||
this.multipleSelection_finish[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
this.multipleSelection_finish[i].checked_waixie = 2
|
||||
}
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
if (this.multipleSelection_finish[i].checked_zhaoji === false) {
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
if (this.multipleSelection_finish[i].checked_dailiao === true) {
|
||||
this.multipleSelection_finish[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
this.multipleSelection_finish[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
@@ -1093,9 +1099,9 @@ export default {
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production(this.multipleSelection[i].组件零件基本件流水号, this.multipleSelection[i].投产类型流水号, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection[i].是否加急件).then(response => {
|
||||
production(this.multipleSelection_finish[i].组件零件基本件流水号, this.multipleSelection_finish[i].投产类型流水号, this.multipleSelection_finish[i].数据类型, this.multipleSelection_finish[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection_finish[i].checked_waixie, this.multipleSelection_finish[i].checked_dailiao, this.id, this.multipleSelection_finish[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection_finish[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection_finish[i].是否加急件).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
if (this.result === this.multipleSelection_finish.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
@@ -1124,7 +1130,7 @@ export default {
|
||||
var that = this
|
||||
setTimeout(function() {
|
||||
that.production10_Loading = false
|
||||
}, 5000)
|
||||
}, 3000)
|
||||
this.result = 0
|
||||
this.UrgentItem = 0
|
||||
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
|
||||
@@ -1138,6 +1144,7 @@ export default {
|
||||
this.production10_Loading = false
|
||||
this.$message.error('加工结束时间应大于开始时间')
|
||||
} else {
|
||||
console.log(2, this.multipleSelection)
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.production10_Loading = false
|
||||
this.$message.error('请至少选择一个零件')
|
||||
@@ -1145,23 +1152,25 @@ export default {
|
||||
if (this.checked_UrgentItem === true) {
|
||||
this.UrgentItem = 1
|
||||
}
|
||||
this.multipleSelection_finish = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
if (this.checked_hebing === true) {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
for (let i = 0; i < this.multipleSelection_finish.length; i++) {
|
||||
if (this.multipleSelection_finish[i].checked_waixie === false) {
|
||||
this.multipleSelection_finish[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
this.multipleSelection_finish[i].checked_waixie = 2
|
||||
}
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
if (this.multipleSelection_finish[i].checked_zhaoji === false) {
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
if (this.multipleSelection_finish[i].checked_dailiao === true) {
|
||||
this.multipleSelection_finish[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
this.multipleSelection_finish[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
@@ -1173,9 +1182,9 @@ export default {
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production20(this.multipleSelection[i].零件图号, this.multipleSelection[i].规格, this.toolNumValue, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection[i].是否加急件).then(response => {
|
||||
production20(this.multipleSelection_finish[i].零件图号, this.multipleSelection_finish[i].规格, this.toolNumValue, this.multipleSelection_finish[i].数据类型, this.multipleSelection_finish[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection_finish[i].checked_waixie, this.multipleSelection_finish[i].checked_dailiao, this.id, this.multipleSelection_finish[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection_finish[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection_finish[i].是否加急件).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
if (this.result === this.multipleSelection_finish.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
@@ -1195,21 +1204,21 @@ export default {
|
||||
}
|
||||
} else {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
for (let i = 0; i < this.multipleSelection_finish.length; i++) {
|
||||
if (this.multipleSelection_finish[i].checked_waixie === false) {
|
||||
this.multipleSelection_finish[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
this.multipleSelection_finish[i].checked_waixie = 2
|
||||
}
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
if (this.multipleSelection_finish[i].checked_zhaoji === false) {
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
this.multipleSelection_finish[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
if (this.multipleSelection_finish[i].checked_dailiao === true) {
|
||||
this.multipleSelection_finish[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
this.multipleSelection_finish[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
@@ -1221,9 +1230,9 @@ export default {
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production10(this.multipleSelection[i].组件零件基本件流水号, this.multipleSelection[i].投产类型流水号, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection[i].是否加急件).then(response => {
|
||||
production10(this.multipleSelection_finish[i].组件零件基本件流水号, this.multipleSelection_finish[i].投产类型流水号, this.multipleSelection_finish[i].数据类型, this.multipleSelection_finish[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection_finish[i].checked_waixie, this.multipleSelection_finish[i].checked_dailiao, this.id, this.multipleSelection_finish[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection_finish[i].checked_zhaoji, this.checked_baitu, this.UrgentItem, this.multipleSelection_finish[i].是否加急件).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
if (this.result === this.multipleSelection_finish.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
@@ -1301,7 +1310,7 @@ export default {
|
||||
message: '打回档案成功!'
|
||||
})
|
||||
this.total = 0
|
||||
this.pageSize = 10000
|
||||
this.pageSize = 20
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
style="width:240px;margin-left: 0px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left:10px" @click="getTableData()">查询</el-button>
|
||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left:10px" @click="pageSize=20;pageCurrent=1;getTableData()">查询</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
||||
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||
</el-tooltip>
|
||||
@@ -175,6 +175,12 @@
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.分配人 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="导入时间"
|
||||
width="100px"
|
||||
align="center">
|
||||
<template slot-scope="scope">{{ scope.row.导入时间 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="分配时间"
|
||||
width="100px"
|
||||
@@ -218,6 +224,9 @@
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<div style="margin-top: 17px;font-size:12px;float:left">已分配:{{ distribution }}件, 分配完成{{ completionRate }}%</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div class="block" style="margin-top: 10px;float:left">
|
||||
<el-pagination
|
||||
@@ -225,11 +234,10 @@
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
<div style="margin-top: 17px;font-size:12px;float:left">已分配:{{ distribution }}件, 分配完成{{ completionRate }}%</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -385,7 +393,7 @@ export default {
|
||||
tableData: [],
|
||||
tableDataWB: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 1000,
|
||||
pageSize: 20,
|
||||
pageCurrentWB: 1,
|
||||
pageSizeWB: 1000,
|
||||
totalWB: 0,
|
||||
@@ -507,7 +515,6 @@ export default {
|
||||
},
|
||||
getTableData() {
|
||||
// this.getFileData(this.machineValue)
|
||||
if (this.machineValue || this.outTime) {
|
||||
const machine_check = this.machineValue ? 1 : 0
|
||||
const group_check = this.groupValue ? 1 : 0
|
||||
const Model_check = this.ModelValue ? 1 : 0
|
||||
@@ -515,12 +522,12 @@ export default {
|
||||
let check_time
|
||||
this.outTime ? check_time = 1 : (check_time = 0, this.outTime = '')
|
||||
this.loading = true
|
||||
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order, assignmentTypeValue_check, this.assignmentTypeValue, check_time, this.outTime[0], this.outTime[1]).then(response => {
|
||||
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order, assignmentTypeValue_check, this.assignmentTypeValue, check_time, this.outTime[0], this.outTime[1], this.pageSize, this.pageCurrent).then(response => {
|
||||
this.loading = false
|
||||
const res = response.data
|
||||
const res = response.data.rows
|
||||
this.distribution = 0
|
||||
this.completionRate = ''
|
||||
this.total = response.data.length
|
||||
this.total = response.data.total
|
||||
this.tableData = res.map(item => {
|
||||
if (item.零件分配 !== '未分配') {
|
||||
this.distribution += 1
|
||||
@@ -536,9 +543,6 @@ export default {
|
||||
return item
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入查询条件')
|
||||
}
|
||||
},
|
||||
openUrgentItem() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
|
||||
@@ -101,6 +101,11 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计量单位" align="center" width="80" prop="计量单位">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计量单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--供货商排序-->
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" sortable="custom" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
@@ -786,6 +791,11 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计量单位" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计量单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<el-pagination
|
||||
@@ -2038,6 +2048,20 @@ export default {
|
||||
})
|
||||
},
|
||||
handleSelectionChange1(val) { // 标准件和外购件多选
|
||||
this.groupPartNumValue = ''
|
||||
this.checkeddd = 0
|
||||
this.materialOldValue = ''
|
||||
this.materialOld111 = ''
|
||||
if (val.length === 1) {
|
||||
this.materialOldValue = val[0].物料流水号
|
||||
this.materialOld111 = val[0].物料名称 + ' ' + val[0].物料规格 + ' ' + val[0].物料型号
|
||||
this.groupPartNumValue = val[0].组件零件流水号
|
||||
if (parseInt(val[0].询价状态编号) === 1 || parseInt(val[0].是否确认) === 1) {
|
||||
this.checkeddd = 1
|
||||
} else {
|
||||
this.checkeddd = 0
|
||||
}
|
||||
}
|
||||
this.groupPartNum = []
|
||||
this.allNum = []
|
||||
this.标准件和外购件流水号 = []
|
||||
|
||||
@@ -16,38 +16,6 @@
|
||||
</div>
|
||||
<!-- <h4 style="margin: 0">发票结算申请单</h4>-->
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row height="250px" style="width: 100%;height: 330px;overflow:auto" size="mini">
|
||||
<!-- <el-table-column type="expand">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :lg="10" :sm="12">-->
|
||||
<!-- <viewer>-->
|
||||
<!-- <img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">-->
|
||||
<!-- </viewer>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="6">-->
|
||||
<!-- <el-form-item label="已付款项">-->
|
||||
<!-- <span>{{ scope.row.已付款项 }}</span>-->
|
||||
<!-- </el-form-item><br>-->
|
||||
<!-- <el-form-item label="尚欠金额">-->
|
||||
<!-- <span>{{ scope.row.尚欠金额 }}</span>-->
|
||||
<!-- </el-form-item><br>-->
|
||||
<!-- <el-form-item label="备注">-->
|
||||
<!-- <span>{{ scope.row.备注 }}</span>-->
|
||||
<!-- </el-form-item><br>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="6">-->
|
||||
<!-- <el-form-item label="是否费用类发票">-->
|
||||
<!-- <span>{{ scope.row.是否费用类 }}</span>-->
|
||||
<!-- </el-form-item><br>-->
|
||||
<!-- <el-form-item label="税额">-->
|
||||
<!-- <span>{{ scope.row.税额 }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="供应商" align="center" width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -63,7 +31,7 @@
|
||||
{{ scope.row.发票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="80">
|
||||
<el-table-column label="申请人" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
@@ -118,24 +86,18 @@
|
||||
{{ scope.row.审批2未过原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="cancel(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="block" style="margin-top: 10px;">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent1"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40]"-->
|
||||
<!-- :page-size="pageSize1"-->
|
||||
<!-- :total="total1"-->
|
||||
<!-- style="display:inline-block;width:50%"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange1"-->
|
||||
<!-- @current-change="handleCurrentChange1"/>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, searchSupplier } from '@/api/PurchasingCenter/InvoiceSettlementApproveSearch'
|
||||
import { cancel, searchTable1, searchSupplier } from '@/api/PurchasingCenter/InvoiceSettlementApproveSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
@@ -170,8 +132,47 @@ export default {
|
||||
this.searchSupplier()
|
||||
},
|
||||
methods: {
|
||||
cancel(row) {
|
||||
console.log(row, 'row')
|
||||
if (Number(this.token) === 18) {
|
||||
cancel(row.发票结算申请单流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('撤回成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('撤回失败')
|
||||
}
|
||||
})
|
||||
} else if (Number(this.token) === 4) {
|
||||
if (row.审批3流水号 === '3') {
|
||||
cancel(row.发票结算申请单流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('撤回成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('撤回失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('已进行财务审批,无法撤回!')
|
||||
}
|
||||
} else if (Number(this.token) === 2) {
|
||||
if (row.审批4流水号 === '3') {
|
||||
cancel(row.发票结算申请单流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('撤回成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('撤回失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('总经理已审批,无法撤回!')
|
||||
}
|
||||
}
|
||||
},
|
||||
fetchData() {
|
||||
// console.log(this.token)
|
||||
console.log(this.token, 'token')
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 1200px;margin-top: 3px"
|
||||
style="width: 1300px;margin-top: 3px"
|
||||
height="600"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
@@ -131,6 +131,11 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计量单位" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计量单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供货商" width="132px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
|
||||
@@ -100,6 +100,11 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计量单位" prop="计量单位">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计量单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供货商" prop="供货商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
@@ -283,7 +288,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='增加'" :disabled="Material_loading" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -475,6 +480,7 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Material_loading: false,
|
||||
打回原因: '',
|
||||
物料流水号: '',
|
||||
tableData5: [],
|
||||
@@ -771,6 +777,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.Material_loading = false
|
||||
this.supplierValue1 = ''
|
||||
this.MaterialCategory1 = []
|
||||
this.MaterialVariety1 = []
|
||||
@@ -778,6 +785,7 @@ export default {
|
||||
this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加'])
|
||||
},
|
||||
submitAdd() { // 提交增加
|
||||
this.Material_loading = true
|
||||
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchMaterial()
|
||||
|
||||
@@ -352,9 +352,9 @@
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数" align="center" width="80">
|
||||
<el-table-column label="采购数" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:100px" @change="saveContract()"/>
|
||||
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:80px" @change="saveContract()"/>
|
||||
<b v-else>{{ scope.row.数量 }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>-->
|
||||
<span v-if="!scope.row.人员编号" type="primary" size="small">未分配</span>
|
||||
<span v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</span>
|
||||
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===1" type="success" size="small">已询价</span>
|
||||
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==1" type="info" size="small">已采购</span>
|
||||
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</span>
|
||||
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="机床图号" prop="机床图号" width="94px" show-overflow-tooltip fixed="left">
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table id="expandTable" :data="tableData1" border stripe highlight-current-row style="width: 100%;" height="400px" size="mini" @row-click="searchTable2">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="200" show-overflow-tooltip>
|
||||
<el-table id="expandTable" :data="tableData1" border stripe highlight-current-row style="width: 100%;" height="400px" size="mini">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票号" prop="发票号" align="center" width="120">
|
||||
<el-table-column label="到票号" prop="发票号" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
@@ -28,12 +28,12 @@
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="操作时间" align="center" width="90">
|
||||
<el-table-column label="创建时间" prop="操作时间" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" prop="申请时间" align="center" width="90">
|
||||
<el-table-column label="申请时间" prop="申请时间" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
@@ -48,7 +48,7 @@
|
||||
{{ scope.row.审批4未过原因 ? scope.row.审批4未过原因 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
|
||||
<el-table-column label="审批时间" align="center" min-width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批4时间 ? scope.row.审批4时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
@@ -73,6 +73,11 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80" fixed="right" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="cancel(scope.row)">撤回审批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -90,7 +95,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchTable1 } from '@/api/WorkshopProcurement/InvoiceSettlementApproveSearchMetalworking'
|
||||
import { searchSupplier, searchTable1, cancel } from '@/api/WorkshopProcurement/InvoiceSettlementApproveSearchMetalworking'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -108,6 +113,7 @@ export default {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'name',
|
||||
'token',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
@@ -116,6 +122,31 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
cancel(row) {
|
||||
if (Number(this.token) === 18) {
|
||||
cancel(row.发票结算申请单流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批撤回成功!')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('审批撤回失败!')
|
||||
}
|
||||
})
|
||||
} else if (Number(this.token) === 4) {
|
||||
if (row.审批3流水号 === 3) {
|
||||
cancel(row.发票结算申请单流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批撤回成功!')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('审批撤回失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('财务审批已通过,无法撤回!')
|
||||
}
|
||||
}
|
||||
},
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
@@ -132,6 +163,7 @@ export default {
|
||||
let check1
|
||||
this.invoiceNum ? check1 = 1 : check1 = 0
|
||||
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
console.log(response, 'response')
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
|
||||
@@ -99,7 +99,8 @@
|
||||
<el-table-column label="操作" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-printer" @click="exportTable()">打印</el-button>
|
||||
<el-button :disabled="scope.row.审批情况内容==='通过审批'" type="text" size="mini" icon="el-icon-back" @click="Disable(scope.row)">打回</el-button>
|
||||
<el-button v-show="isShow1" :disabled="scope.row.审批情况内容==='通过审批'" type="text" size="mini" icon="el-icon-back" @click="Disable(scope.row)">打回</el-button>
|
||||
<el-button v-show="isShow" :disabled="scope.row.请款合同流水号 !== '' || Number(scope.row.审批情况流水号) === 3" type="text" size="mini" icon="el-icon-back" @click="Cancle(scope.row)">撤销审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -374,9 +375,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, Disable, searchTable3 } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, Disable, searchTable3, cancle } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
import $ from 'jquery'
|
||||
import QRCode from 'qrcode'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -435,15 +437,42 @@ export default {
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
textarea: ``,
|
||||
isShow: false,
|
||||
isShow1: false,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'token',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
Cancle(row) {
|
||||
cancle(row.采购合同流水号, row.请购单流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批撤回成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('审批撤回失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
if (Number(this.token) === 26) {
|
||||
this.isShow = true
|
||||
} else if (Number(this.token) === 38) {
|
||||
this.isShow1 = true
|
||||
}
|
||||
console.log(this.token, 'token')
|
||||
this.contractNum = []
|
||||
initContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -511,7 +540,7 @@ export default {
|
||||
}
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startTime[0], this.startTime[1], this.check2, this.contractNumValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data.rows)
|
||||
console.log(response.data.rows, 'response')
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="Number(token) === 4 ? Number(scope.row.审批情况流水号) === 3 : Number(scope.row.付款情况流水号) === 3" type="text" size="mini" @click="cancel(scope.row)">撤回</el-button>
|
||||
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@@ -158,7 +159,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initBuyer, searchTable1, searchSupplier } from '@/api/WorkshopProcurement/RequestApprovalQuery2'
|
||||
import { initBuyer, searchTable1, searchSupplier, cancel } from '@/api/WorkshopProcurement/RequestApprovalQuery2'
|
||||
import { searchRequsetFundDetail } from '@/api/WorkshopProcurement/PurchaseContractRequestFund1'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
@@ -186,6 +187,7 @@ export default {
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'token',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
@@ -195,6 +197,31 @@ export default {
|
||||
this.searchSupplier()
|
||||
},
|
||||
methods: {
|
||||
cancel(row) {
|
||||
if (Number(this.token) === 18) {
|
||||
cancel(row.采购合同请款流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批撤销成功!')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.message.error('审批撤销失败!')
|
||||
}
|
||||
})
|
||||
} else if (Number(this.token) === 4) {
|
||||
if (Number(row.付款情况流水号) === 3) {
|
||||
cancel(row.采购合同请款流水号, this.token).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批撤销成功!')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.message.error('审批撤销失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('财务已审批,无法撤回!')
|
||||
}
|
||||
}
|
||||
},
|
||||
searchSupplier() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
|
||||
Reference in New Issue
Block a user