This commit is contained in:
lixin
2018-12-07 19:09:41 +08:00
parent 7d9f713ecd
commit 4b3fbca55b
10 changed files with 982 additions and 19 deletions

View File

@@ -96,14 +96,14 @@ export function deleteLocate(num) {
}) })
} }
// 人员查询 需要在部门确定之后修改 // 人员查询 需要在部门确定之后修改
export function searchPeople() { export function searchPeople(role) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', name: '菜单系统模块_项目角色员工综合_查询数据',
param: '考核部门编号=' + 18 param: '姓名_check=' + 0 + '&角色编号_check=' + 1 + '&角色编号=' + role + '&考核部门编号_check=' + 0
} }
}) })
} }

View File

View File

@@ -49,14 +49,14 @@ export function PurchasePart(data1, data2, data3, data4, data5) {
}) })
} }
// 基本件零件出库 // 基本件零件出库
export function BasicPart(data1, data2, data3, data4) { export function BasicPart(data1, data2, data3, data4, data5) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: 'MES_机加工MES_库存管理_出库模块_出库零件信息_零件出库', name: 'MES_机加工MES_库存管理_出库模块_出库零件信息_零件出库',
param: '工艺计划流水号=' + data1 + '&本次出库数量=' + data2 + '&收件信息ID=' + data3 + '&出库备注=' + data4 param: '工艺计划流水号=' + data1 + '&本次出库数量=' + data2 + '&收件信息ID=' + data3 + '&领用人编号=' + data4 + '&出库备注=' + data5
} }
}) })
} }

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1544170440866" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1773" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M336.879 900.835a50.548 50.548 0 1 0 103.452 0 50.548 50.548 0 1 0-103.452 0z m433.291 0a50.549 50.549 0 1 0 103.455 0 50.549 50.549 0 1 0-103.455 0z m92.928-139.044h-0.116l-496.037 1.825-15.79-1.701c-5.08-2.163-27.46-14.721-35.71-70.32L251.787 213.12a31.414 31.414 0 0 0-0.07-2.316c-3.672-51.243-25.151-80.299-42.523-95.65-19.508-17.24-38.558-21.79-42.179-22.527a30.776 30.776 0 0 0-5.937-0.617l-63.242-0.387h-0.193c-16.866 0-30.591 13.621-30.695 30.51-0.103 16.955 13.557 30.784 30.511 30.887l58.843 0.36c6.653 2.558 24.227 12.108 31.424 43.074a30.5 30.5 0 0 0 0.21 2.305l66.676 501.158 0.06 0.432c15.638 106.007 77.628 120.631 84.645 121.95 0.789 0.149 1.584 0.265 2.382 0.351l20.367 2.194c1.093 0.118 2.19 0.177 3.289 0.177h0.11l497.742-1.83c16.955-0.064 30.648-13.858 30.587-30.812-0.062-16.918-13.794-30.588-30.696-30.588z m89.323-469.54c8.059-35.101 4.077-64.313-11.892-86.917-22.965-32.51-60.684-36.038-64.909-36.334a29.394 29.394 0 0 0-2.239-0.075L351.83 170.59c-16.955 0.054-30.656 13.843-30.601 30.798 0.054 16.955 13.834 30.681 30.797 30.6l519.833-1.66c2.46 0.421 13.037 2.663 18.523 10.43 3.539 5.01 5.039 12.558 4.527 22.013-0.275 1.058-0.499 2.14-0.664 3.247l-2.176 14.662c-0.31 1.25-0.64 2.517-0.998 3.804a30.62 30.62 0 0 0-1.063 10.076l-37.12 250a30.947 30.947 0 0 0-0.922 4.88c-4.959 46.84-25.685 52.697-28.93 53.328l-404.592 36.368c-16.887 1.517-29.346 16.437-27.828 33.324 1.434 15.953 14.826 27.952 30.54 27.952 0.92 0 1.85-0.04 2.784-0.125l405.007-36.405c4.904-0.434 22.983-3.013 41.558-17.937 10.81-8.686 23.471-23.05 32.396-46.208a30.557 30.557 0 0 0 5.963-14.118l43.558-293.368z" p-id="1774"></path></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -115,7 +115,8 @@ export default {
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'id' 'id',
'token'
]) ])
}, },
created() { created() {
@@ -145,6 +146,8 @@ export default {
// 获取人员编号 // 获取人员编号
getpeopleid() { getpeopleid() {
this.PeopleNumber = this.id this.PeopleNumber = this.id
const a = this.token
console.log(a, 1111)
}, },
aaa() { aaa() {
print('#print') print('#print')
@@ -174,9 +177,9 @@ export default {
getCraftNumber() { getCraftNumber() {
CraftNumber(this.Partpaint).then(response => { CraftNumber(this.Partpaint).then(response => {
this.partNumber = response.data[0].工艺计划流水号 this.partNumber = response.data[0].工艺计划流水号
}).then(() => {
this.getscantable()
}) })
console.log(this.partNumber, 1111)
this.getscantable()
}, },
getPaint() { getPaint() {
searchPartNumber(this.partNumber).then(response => { searchPartNumber(this.partNumber).then(response => {

View File

@@ -114,7 +114,7 @@
</el-table-column> </el-table-column>
<el-table-column label="入库人员" align="center" min-width="80"> <el-table-column label="入库人员" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库人员 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库时间" align="center" min-width="80"> <el-table-column label="入库时间" align="center" min-width="80">
@@ -147,7 +147,7 @@
</el-table-column> </el-table-column>
<el-table-column label="领用者" align="center" min-width="80"> <el-table-column label="领用者" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.领用人编号 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出库备注" align="center" min-width="80"> <el-table-column label="出库备注" align="center" min-width="80">

View File

@@ -246,6 +246,7 @@
<script> <script>
import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLocate, addLocate, alterLocate, deleteLocate, searchPeople } from '@/api/Inventory/InventoryManagement' import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLocate, addLocate, alterLocate, deleteLocate, searchPeople } from '@/api/Inventory/InventoryManagement'
import QRCode from 'qrcode' import QRCode from 'qrcode'
import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
@@ -297,14 +298,26 @@ export default {
}, { }, {
value: '0', value: '0',
label: '否' label: '否'
}] }],
role: ''
} }
}, },
computed: {
...mapGetters([
'token'
])
},
created() { created() {
this.getTable() this.getTable()
this.searchPeopleData() this.getpeopleid()
}, },
methods: { methods: {
// 获取人员编号
getpeopleid() {
this.role = this.token
console.log(this.role, 321312)
this.searchPeopleData()
},
// 查询仓库 // 查询仓库
getTable() { getTable() {
this.tableData = [] this.tableData = []
@@ -331,7 +344,7 @@ export default {
}, },
searchPeopleData() { // 查询人员 searchPeopleData() { // 查询人员
this.Contactpeople = [] this.Contactpeople = []
searchPeople().then(response => { searchPeople(this.role).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.Contactpeople.push({ this.Contactpeople.push({
label: response.data[i].姓名, label: response.data[i].姓名,

View File

@@ -0,0 +1,916 @@
<template>
<div class="app-container">
<el-card>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>库存状态:</span>
<el-select v-model="inventoryStateValue" placeholder="库存状态" size="small" clearable>
<el-option
v-for="item in inventoryState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>仓库:</span>
<el-select v-model="purchaseStateValue" placeholder="仓库" size="small">
<el-option
v-for="item in purchaseState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading1"
:data="tableData1"
border
style="width: 100%;max-height: 300px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="库存状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small">不足</el-tag>
<el-tag v-else type="success" size="small">充足</el-tag>
</template>
</el-table-column>
<el-table-column label="物料名称" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="供货商" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="当前库存量" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
</template>
</el-table-column>
<el-table-column label="安全库存量" min-width="200" align="center">
<template slot-scope="scope">
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.安全库存量 }}</span>
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</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>
<el-card>
<span>请购单号:</span>
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="addOfflineContract">创建离线请购单</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="请购单状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="parseInt(scope.row.离线合同状态)===2" type="primary" size="small">采购中</el-tag>
<el-tag v-if="parseInt(scope.row.离线合同状态)===4" type="success" size="small">已到货</el-tag>
<el-tag v-if="parseInt(scope.row.离线合同状态)===5" type="info" size="small">已作废</el-tag>
</template>
</el-table-column>
<el-table-column label="请购单编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="请购单名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.离线合同名称 }}
</template>
</el-table-column>
<el-table-column label="请购人" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="请购时间" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="280" fixed="right">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)">编辑</el-button>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
<el-button type="warning" size="mini" icon="el-icon-download">导出</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 300px;" height="300px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="参考价格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" :disabled="disable" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="合计" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
<el-col :span="12">
<el-form-item label="供应商名称">
<el-input v-model="supplierName" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质">
<el-input v-model="enterpriseNature" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="货期">
<el-input v-model="goodTime" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注册资本">
<el-input v-model="registeredCapital" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="税号">
<el-input v-model="taxNum" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子邮箱">
<el-input v-model="EMail" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="地址">
<el-input v-model="address" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="账号">
<el-input v-model="account" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开户行">
<el-input v-model="openingBank" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话号码">
<el-input v-model="phone" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="传真">
<el-input v-model="fax" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-button
type="success"
size="small"
icon="el-icon-search"
@click="searchSupplier">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-check"
@click="submitSelectSupplier">确定</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
@click="emptySupplierDetail">清空</el-button>
</el-col>
</el-row>
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
<el-table-column align="center" label="供应商名称" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="企业性质" min-width="100">
<template slot-scope="scope">
{{ scope.row.企业性质 }}
</template>
</el-table-column>
<el-table-column align="center" label="创立日期" min-width="100">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="注册资本" min-width="100">
<template slot-scope="scope">
{{ scope.row.注册资本 }}
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, initPayMethod, initPayTimeNode, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
data() {
return {
loading1: false,
title2: '',
purchaseStateValue: 2, // 采购状态 全部
purchaseState: [
{
label: '未采购',
value: 1
}, {
label: '全部',
value: 2
}
],
check1: 0,
check2: 0,
check3: 0,
check4: 0,
materialName: '',
inventoryStateValue: '', // 库存状态
inventoryState: [
{
label: '充足',
value: 2
},
{
label: '不足',
value: 1
}
],
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
offlineContractNum: '', // 离线合同流水号
offlineContract: '', // 离线合同号
supplierName0: '', // 供应商名称(外面的)
supplierName: '', // 供应商名称
payMethod: [], // 付款方式
payTime: [], // 付款时间节点
tableData2: [],
total2: 0,
pageCurrent2: 1,
pageSize2: 10,
dialogVisible1: false,
form1: {},
supplierCheck1: 0,
supplierCheck2: 0,
supplierCheck3: 0,
supplierCheck4: 0,
supplierCheck5: 0,
supplierCheck6: 0,
supplierCheck7: 0,
supplierCheck8: 0,
supplierCheck9: 0,
supplierCheck10: 0,
supplierCheck11: 0,
supplierCheck12: 0,
supplierValue: '', // 供应商流水号
goodTime: '', // 货期
enterpriseNature: '', // 企业性质
createDate: '', // 创立日期
registeredCapital: '', // 注册资本
taxNum: '', // 税号
EMail: '', // 电子邮箱
address: '', // 地址
account: '', // 账号
openingBank: '', // 开户行
phone: '', // 电话号码
fax: '', // 传真
tableData01: [],
dialogVisible2: false,
form2: {
离线合同流水号: '',
离线合同编号: '',
离线合同名称: '',
供应商流水号: '',
供应商名称: '',
规定到货时间: '',
运费: '',
付款方式: '',
第一次付款时间: 1,
第二次付款时间: 1,
第三次付款时间: 1,
第四次付款时间: 1
},
rules2: { // 离线合同表单验证规则
离线合同编号: [{ required: true, message: '请填写离线合同编号' }],
离线合同名称: [{ required: true, message: '请填写离线合同名称' }],
供应商名称: [{ required: true, message: '请选择供应商' }],
规定到货时间: [{ required: true, message: '请选择规定到货时间' }],
运费: [{ required: true, message: '请填写运费' }],
付款方式: [{ required: true, message: '请选择付款方式' }]
},
tableData3: [],
textArea: '请选择',
materielGroup: [], // 物料流水号组
partGroup: [], // 离线合同明细流水号组
numGroup: [], // 数量组
priceGroup: [], // 单价组
totalPrice: 0, // 合同总额
tableData4: [], // 合同模板
stipulateArrivalTime: '', // 规定到货时间
payMethodName: '', // 付款方式名称
paramRow: '', // 参数row
disable2: true,
disable3: true,
disable4: true,
disable: true // 其他的禁用
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initPayMethod().then(response => { // 初始化付款方式
for (let i = 0; i < response.data.length; i++) {
this.payMethod.push({
label: response.data[i].付款方式内容,
value: response.data[i].付款方式流水号
})
}
})
initPayTimeNode().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.payTime.push({
label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号
})
}
})
searchContractDemo().then(response => { // 初始化合同模板
this.tableData4 = response.data
})
},
searchTable1() { // 查询物料库物料
this.loading1 = true
this.materialName ? this.check1 = 1 : this.check1 = 0
this.inventoryStateValue ? this.check2 = 1 : this.check2 = 0
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'changeSafeValue', false)
v.原安全库存量 = v.安全库存量
return v
})
this.total1 = response.data.total
this.loading1 = false
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
handleSelectionChange(val) {
this.materielGroup = []
for (let i = 0; i < val.length; i++) {
this.materielGroup.push(val[i].物料流水号)
}
},
cancelEdit(row) { // 取消设置
row.安全库存量 = row.原安全库存量
row.changeSafeValue = false
this.$message('取消修改')
},
confirmEdit(row) { // 确认设置
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
if (response.data[0].result === '1') {
row.changeSafeValue = false
this.$message.success('设置成功')
this.searchTable1()
} else {
this.$message.error('设置失败')
}
})
},
searchTable2() { // 查询离线合同列表
this.offlineContract ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.offlineContract, this.check4, this.supplierName0).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) { // 离线合同列表分页
this.pageSize2 = val
this.searchTable2()
},
handleCurrentChange2(val) { // 离线合同列表分页
this.pageCurrent2 = val
this.searchTable2()
},
addOfflineContract() { // 创建离线合同
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '创建离线合同'
this.form2.离线合同编号 = ''
this.form2.离线合同名称 = ''
this.form2.供应商流水号 = ''
this.form2.供应商名称 = ''
this.form2.规定到货时间 = ''
this.form2.运费 = ''
this.form2.付款方式 = ''
this.form2.第一次付款时间 = 1
this.form2.第二次付款时间 = 0
this.form2.第三次付款时间 = 0
this.form2.第四次付款时间 = 0
this.dialogVisible2 = true
},
editOfflineContract(row) {
console.log(row)
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑离线合同'
this.form2.离线合同流水号 = row.离线合同流水号
this.form2.离线合同编号 = row.离线合同编号
this.form2.离线合同名称 = row.离线合同名称
this.form2.供应商流水号 = row.供应商流水号
this.form2.供应商名称 = row.供应商名称
this.form2.规定到货时间 = row.规定到货时间
this.form2.运费 = row.运费
this.form2.付款方式 = parseInt(row.付款方式流水号)
this.form2.第一次付款时间 = parseInt(row.第一次付款时间节点流水号)
this.form2.第二次付款时间 = parseInt(row.第二次付款时间节点流水号)
this.form2.第三次付款时间 = parseInt(row.第三次付款时间节点流水号)
this.form2.第四次付款时间 = parseInt(row.第四次付款时间节点流水号)
this.payMethodChange()
this.dialogVisible2 = true
},
submitEditOfflineContract() {
this.$refs['form2'].validate((valid) => {
if (valid) {
this.disable2 ? this.form2.第二次付款时间 = 0 : this.form2.第二次付款时间
this.disable3 ? this.form2.第三次付款时间 = 0 : this.form2.第三次付款时间
this.disable4 ? this.form2.第四次付款时间 = 0 : this.form2.第四次付款时间
const numGroup1 = [] // 空数组,放现有的离线合同号
const numGroup2 = [] // 空数组,放现有的离线合同流水号
searchOfflineContract2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].离线合同编号)
numGroup2.push(response.data[i].离线合同流水号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1 && numGroup1.indexOf(this.form2.离线合同编号) !== numGroup2.indexOf(parseInt(this.form2.离线合同流水号))) {
this.$message.error('该离线合同编号已存在')
} else {
editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.运费, this.form2.付款方式, this.form2.第一次付款时间, this.form2.第二次付款时间, this.form2.第三次付款时间, this.form2.第四次付款时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改离线合同成功')
this.searchTable2()
this.dialogVisible2 = false
} else { this.$message.error('修改离线合同失败') }
})
}
})
} else {
console.log('error submit!!')
return false
}
})
},
deleteOfflineContract(row) { // 作废离线合同
this.$confirm('确定作废该合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteOfflineContract(row.离线合同流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('作废成功')
this.searchTable2()
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('作废失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
})
})
},
submitAddOfflineContract() { // 新建离线合同
this.$refs['form2'].validate((valid) => {
if (valid) {
this.disable2 ? this.form2.第二次付款时间 = 0 : this.form2.第二次付款时间
this.disable3 ? this.form2.第三次付款时间 = 0 : this.form2.第三次付款时间
this.disable4 ? this.form2.第四次付款时间 = 0 : this.form2.第四次付款时间
const numGroup1 = [] // 空数组,放现有的询价单号
searchOfflineContract2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].离线合同编号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1) {
this.$message.error('该离线合同编号已存在')
} else {
addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.运费, this.form2.付款方式, this.form2.第一次付款时间, this.form2.第二次付款时间, this.form2.第三次付款时间, this.form2.第四次付款时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建离线合同成功')
this.searchTable2()
this.dialogVisible2 = false
} else { this.$message.error('新建离线合同失败') }
})
}
})
} else {
console.log('error submit!!')
return false
}
})
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
this.tableData01 = response.data
})
},
showSupplierDetail(row) {
this.form2.供应商流水号 = row.供应商流水号
this.form2.供应商名称 = row.供应商名称
this.supplierValue = row.供应商流水号
this.supplierName = row.供应商名称
this.enterpriseNature = row.企业性质
this.createDate = row.创立日期
this.registeredCapital = row.注册资本
this.taxNum = row.税号
this.EMail = row.电子信箱
this.address = row.地址
this.account = row.帐号
this.openingBank = row.开户行
this.phone = row.电话号码
this.fax = row.传真
this.goodTime = row.货期
},
emptySupplierDetail() {
this.supplierValue = ''
this.supplierName = ''
this.enterpriseNature = ''
this.createDate = ''
this.registeredCapital = ''
this.taxNum = ''
this.EMail = ''
this.address = ''
this.account = ''
this.openingBank = ''
this.phone = ''
this.fax = ''
this.goodTime = ''
},
submitSelectSupplier() { // 确定选择供应商
this.dialogVisible1 = false
},
searchTable3(row) { // 查询离线合同明细
this.stipulateArrivalTime = row.规定到货时间.split(' ')[0]
this.payMethodName = row.付款方式内容
this.offlineContractNum = row.离线合同流水号
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
this.textArea = row.合同文本
if (parseInt(row.离线合同状态) !== 1) { // 是否未编辑模式
this.disable = true
} else {
this.disable = false
}
},
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
} else if (index === 7) {
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
addMateriel() { // 将物料选入离线合同
addMateriel(this.offlineContractNum, this.materielGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('选入成功')
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('选入失败') }
})
},
deleteMateriel(row) { // 移除物料
this.$confirm('确定移除该物料?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteMateriel(row.离线合同明细流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('移除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消移除'
})
})
},
doneOfflineContact() { // 生成离线合同
this.$confirm('确定生成合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.totalPrice = 0
this.partGroup = []
this.numGroup = []
this.priceGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
this.numGroup.push(this.tableData3[i].数量)
this.priceGroup.push(this.tableData3[i].单价)
}
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.textArea, this.partGroup, this.numGroup, this.priceGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同生成成功')
this.searchTable2()
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('离线合同生成失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
searchDemo(row = this.paramRow) {
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label
}
}
this.paramRow = row
if (!this.disable) {
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
})
}
},
payMethodChange() { // 付款方式改变
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.form2.付款方式) {
this.payMethodName = this.payMethod[i].label
}
}
const payTimeNum = this.payMethodName.split(':')
switch (payTimeNum.length) {
case 1:
this.disable2 = true
this.disable3 = true
this.disable4 = true
break
case 2:
this.disable2 = false
this.disable3 = true
this.disable4 = true
break
case 3:
this.disable2 = false
this.disable3 = false
this.disable4 = true
break
case 4:
this.disable2 = false
this.disable3 = false
this.disable4 = false
break
}
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.el-tag{
margin: 0
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 5px;
}
</style>

View File

@@ -67,9 +67,14 @@
{{ scope.row.出库数量 }} {{ scope.row.出库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="130"> <el-table-column label="货位" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货位流水号 }} {{ scope.row.货位名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" min-width="130"> <el-table-column label="备注" align="center" min-width="130">
@@ -196,7 +201,7 @@ export default {
} else { this.$message.error('出库失败') } } else { this.$message.error('出库失败') }
}) })
} else { } else {
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => { BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, this.getpicikingPeople, row.备注).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('出库成功') this.$message.success('出库成功')
ListDetailOut(row.领料单明细流水号) ListDetailOut(row.领料单明细流水号)

View File

@@ -96,6 +96,16 @@
{{ scope.row.出库数量 }} {{ scope.row.出库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="130"> <el-table-column label="备注" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
@@ -168,21 +178,31 @@
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" min-width="80"> <el-table-column label="数量" align="center" min-width="40">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存数量" align="center" min-width="80"> <el-table-column label="库存数量" align="center" min-width="40">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.可出库数量 }} {{ scope.row.可出库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待出库数量" align="center" min-width="80"> <el-table-column label="待出库数量" align="center" min-width="40">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.待出库数量 }} {{ scope.row.待出库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80"> <el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
@@ -195,7 +215,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="80"> <el-table-column label="操作" align="center" min-width="80">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicListDetailinfor(scope.row)">领料</el-button> <el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicListDetailinfor(scope.row)">领料</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -633,6 +653,11 @@ export default {
this.total1 = response.data.total this.total1 = response.data.total
}) })
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
const data = response.data.rows
console.log(data, 323423)
for (let i = 0; i < data.length; i++) {
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataBasic = response.data.rows this.tableDataBasic = response.data.rows
this.listLoading1 = false this.listLoading1 = false
this.total = response.data.total this.total = response.data.total