Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -122,14 +122,14 @@ export function save(num1, num2, num3) {
|
||||
})
|
||||
}
|
||||
// 保存
|
||||
export function save2(num1, num2, num3) {
|
||||
export function save2(num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_工艺任务分配_保存数据',
|
||||
param: '工艺计划流水号=' + num1 + '&人员编号=' + num2 + '&零件图号=' + num3
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_工艺任务分配_通用件自动编制工艺_循环执行',
|
||||
param: '工艺计划流水号组=' + num1 + '&零件图号组=' + num2 + '&规格组=' + num3 + '&工艺员流水号组=' + num4
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export function initSupplier11(num) {
|
||||
type: '3',
|
||||
name: ` SELECT distinct 供应商流水号,供应商名称
|
||||
FROM 采购管理_询价单_视图
|
||||
where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
|
||||
where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and (是否未通过 is null or 是否未通过 <> 1) and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -38,38 +38,38 @@ export function searchLxPurchaseOrder(pageCurrent, pageSize, check1, num, check2
|
||||
})
|
||||
}
|
||||
// 查询采购计划明细
|
||||
export function searchMateriel(num, check, num1) {
|
||||
export function searchMateriel(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_采购计划明细_查询数据_未选入',
|
||||
param: `采购计划流水号=${num}&零件图号_check=${check}&零件图号=${num1}`
|
||||
param: `供应商=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线采购计划明细
|
||||
export function searchLxMateriel(num, check, num1) {
|
||||
export function searchLxMateriel(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_离线采购计划明细_查询数据_未选入',
|
||||
param: `离线采购计划流水号=${num}&零件图号_check=${check}&零件图号=${num1}`
|
||||
param: `供应商流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询到货单
|
||||
export function searchArriveOrder(num8, num9, num2, num3, num5, num6, num7, pageCurrent, pageSize) {
|
||||
export function searchArriveOrder(num8, num9, num6, num7, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_到货单查询_新',
|
||||
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&开始日期_check=${num2}&开始日期=${num3}&结束日期=${num5}&是否关联_check=${num6}&是否关联=${num7}`,
|
||||
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&是否关联_check=${num6}&是否关联=${num7}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
@@ -87,14 +87,14 @@ export function addPurchaseOrder(num5, num6, num7) {
|
||||
})
|
||||
}
|
||||
// 编辑采购单
|
||||
export function editPurchaseOrder(num5, num6, num7, num8) {
|
||||
export function editPurchaseOrder(num5, num6, num8) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_编辑到货单',
|
||||
param: `备注=${num5}&到货单流水号=${num6}&供应商流水号=${num7}}&日期=${num8}`
|
||||
param: `备注=${num5}&到货单流水号=${num6}&日期=${num8}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -144,14 +144,14 @@ export function EditArrivalOrderMX(num, num2, num3, num4, num5) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function AddArrivalOrderMX(num, num1, num2, num3, num4, num5) {
|
||||
export function AddArrivalOrderMX(num, num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, id) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_新增到货单明细',
|
||||
param: `到货单流水号=${num}&材料=${num1}&数量=${num2}&单位=${num3}&单价=${num4}&金额=${num5}`
|
||||
param: `到货单流水号=${num}&材料=${num1}&数量=${num2}&单位=${num3}&单价=${num4}&金额=${num5}&工艺计划流水号组=${num6}&采购计划明细流水号组=${num7}&本次到货数量组=${num8}&离线采购计划明细流水号组=${num9}&到货重量组=${num10}&到货金额组=${num11}&考勤编号=${id}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -168,14 +168,14 @@ export function deleteMateriel(num1, num2, num3) {
|
||||
})
|
||||
}
|
||||
// 关联材料
|
||||
export function addMateriel(num1, num2, num3, num4, num5, id) {
|
||||
export function addMateriel(num1, num2, num3, num4, num5, num6, num7, id) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_到货单明细关联',
|
||||
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}&离线采购计划明细流水号组=${num5}&考勤编号=${id}`
|
||||
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}&离线采购计划明细流水号组=${num5}&到货重量组=${num6}&到货金额组=${num7}&考勤编号=${id}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -26,14 +26,14 @@ export function searchInvoiceDetail(num) {
|
||||
})
|
||||
}
|
||||
// 发票增加
|
||||
export function addInvoice(time1, money, send, remark, num3) {
|
||||
export function addInvoice(time1, money, send, remark, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_发票_增加数据',
|
||||
param: `开票时间=${time1}&开票金额=${money}&发票号=${send}&备注=${remark}&供应商=${num3}`
|
||||
param: `开票时间=${time1}&开票金额=${money}&发票号=${send}&备注=${remark}&供应商=${num3}&到货单流水号组=${num4}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" icon="el-icon-bangzhu" style="margin-left: 10px" @click="selectAll(tableData)">全选</el-button>
|
||||
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px" @click="save">保存</el-button>
|
||||
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px" @click="currency">保存</el-button>
|
||||
<!--<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px;float: right" @click="currency">通用件保存</el-button>-->
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -133,7 +133,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getProject0, getProject, getGraphNum, getGroupNum, getTable0, getGraphNum0, getGroupNum0, getTable00, save, initPerson } from '@/api/ManufacturingCenter/ProcessTaskAssignment'
|
||||
import { getProject0, getProject, getGraphNum, getGroupNum, getTable0, getGraphNum0, getGroupNum0, getTable00, save, initPerson, save2 } from '@/api/ManufacturingCenter/ProcessTaskAssignment'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -161,6 +161,7 @@ export default {
|
||||
PageSize: 50,
|
||||
total: 0,
|
||||
Craftsmens: [], // 工艺员
|
||||
工艺计划流水号组: [],
|
||||
通用件图号: [],
|
||||
通用件规格: [],
|
||||
工艺员: []
|
||||
@@ -224,6 +225,8 @@ export default {
|
||||
}
|
||||
},
|
||||
getGraphNum() { // 获取下拉图号
|
||||
this.graphNumValue = ''
|
||||
this.graphNum = []
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
this.GroupNumValue = ''
|
||||
@@ -383,19 +386,35 @@ export default {
|
||||
},
|
||||
// 直接保存工艺
|
||||
currency() {
|
||||
this.工艺计划流水号组 = []
|
||||
this.通用件图号 = []
|
||||
this.通用件规格 = []
|
||||
this.工艺员 = []
|
||||
var check = 1
|
||||
this.multipleSelection.map(v => {
|
||||
if (!v.工艺员) {
|
||||
return false
|
||||
check = 0
|
||||
}
|
||||
console.log(111)
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.通用件图号.push(v.零件号)
|
||||
this.通用件规格.push(v.规格)
|
||||
this.工艺员.push(v.工艺员)
|
||||
})
|
||||
console.log(this.通用件图号, this.通用件规格, this.工艺员)
|
||||
if (check === 1) {
|
||||
console.log(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员)
|
||||
save2(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员).then(response => {
|
||||
console.log(response.data, 231)
|
||||
if (response.data[0].结果 === 'success') {
|
||||
this.$message.success('保存成功')
|
||||
this.PageCurrent = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
this.$message.error('请选择工艺员')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择工艺员')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,22 +67,22 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="签订日期" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同签订日期 !== '1900-01-01' ? scope.row.合同签订日期 : '-' }}
|
||||
{{ scope.row.合同签订日期 !== '1900-01-01' ? scope.row.合同签订日期 : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货节点 !== '1900-01-01' ? scope.row.发货节点 : '-' }}
|
||||
{{ scope.row.发货节点 !== '1900-01-01' ? scope.row.发货节点 : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备预验节点" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备预验收节点 !== '1900-01-01' ? scope.row.设备预验收节点 : '-' }}
|
||||
{{ scope.row.设备预验收节点 !== '1900/1/1' ? scope.row.设备预验收节点 : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安装调试节点" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安装调试节点 !== '1900-01-01' ? scope.row.安装调试节点 : '-' }}
|
||||
{{ scope.row.安装调试节点 !== '1900/1/1' ? scope.row.安装调试节点 : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设计者" align="center" width="90px">
|
||||
@@ -101,7 +101,7 @@
|
||||
<el-date-picker v-model="scope.row.审图计划开始时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.审图计划开始时间 !== '1900-01-01' ? scope.row.审图计划开始时间 : '-' }}
|
||||
{{ scope.row.审图计划开始时间 !== '1900/1/1' ? scope.row.审图计划开始时间 : '' }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -111,7 +111,7 @@
|
||||
<el-date-picker v-model="scope.row.审图计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.审图计划完成时间 !== '1900-01-01' ? scope.row.审图计划完成时间 : '-' }}
|
||||
{{ scope.row.审图计划完成时间 !== '1900/1/1' ? scope.row.审图计划完成时间 : '' }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -121,7 +121,7 @@
|
||||
<el-date-picker v-model="scope.row.审图实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.审图实际完成时间 !== '1900-01-01' ? scope.row.审图实际完成时间 : '-' }}
|
||||
{{ scope.row.审图实际完成时间 !== '1900/1/1' ? scope.row.审图实际完成时间 : '' }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -1,32 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-col v-show="false" :span="9">
|
||||
<span>原材料名称:</span>
|
||||
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
|
||||
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchRawMaterial()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel2">选入原材料</el-button>
|
||||
<el-table :data="tableData" border style="width: 100%;height: 460px;margin-top: 15px;" height="330" size="mini" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="原材料名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col style="margin-left: 0px">
|
||||
<span>零件图号:</span>
|
||||
<el-card style="margin-left: 0px;width: 37%;float: left">
|
||||
<el-col>
|
||||
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0" @keyup.enter.native="searchTable1"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
@@ -34,34 +9,34 @@
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
|
||||
<el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button>
|
||||
</el-tooltip>
|
||||
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="330" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="机床图号" prop="机床图号" min-width="100" align="center">
|
||||
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="690" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="45"/>
|
||||
<el-table-column label="机床图号" prop="机床图号" width="95" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" prop="组号" min-width="100" align="center">
|
||||
<el-table-column label="组号" prop="组号" width="65" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" min-width="100" align="center">
|
||||
<el-table-column label="零件图号" prop="零件图号" min-width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" min-width="100" align="center">
|
||||
<el-table-column label="零件名称" prop="零件名称" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" width="140" align="center">
|
||||
<el-table-column label="数量" width="50" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" prop="材料" align="center">
|
||||
<el-table-column label="材料" prop="材料" width="85" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
@@ -80,11 +55,9 @@
|
||||
</el-col>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-card style="margin-left: 10px;width: 62.3%;float: left">
|
||||
<div> <!--slot="header"-->
|
||||
<span>采购计划单号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
|
||||
<span style="margin-left: 10px">供应商:</span>
|
||||
<el-select v-model="supplierName0" placeholder="供应商" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in supplierName0s"
|
||||
@@ -96,16 +69,16 @@
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">
|
||||
<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-tooltip>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入外购备料</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">
|
||||
<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>
|
||||
<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="100" fixed="left">
|
||||
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="200px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="75" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</el-tag>
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</el-tag>
|
||||
@@ -113,41 +86,36 @@
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购计划单号" prop="采购单号" align="center" min-width="170">
|
||||
<el-table-column label="采购计划单号" prop="采购单号" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购计划单名称" prop="采购单名称" align="center" min-width="170">
|
||||
<el-table-column label="采购计划单名称" prop="采购单名称" align="center" width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="250" show-overflow-tooltip>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" prop="姓名" align="center" min-width="80">
|
||||
<el-table-column label="采购员" prop="姓名" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单日期" prop="下单日期" 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.计划完成日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="350" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="250" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打印" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印采购计划</el-button>
|
||||
<el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
@@ -174,54 +142,54 @@
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" size="mini">
|
||||
<el-table-column label="采购状态" align="center">
|
||||
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" height="455px" size="mini">
|
||||
<el-table-column label="采购状态" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="200">
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<el-table-column label="零件名称" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" prop="材料" align="center" >
|
||||
<el-table-column label="材料" prop="材料" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center">
|
||||
<el-table-column label="数量" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="250px">
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:240px" @change="saveWeight(scope.$index, scope.row)"/>
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" width="100px">
|
||||
<el-table-column label="单位" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:70px" @change="saveMoney(scope.$index, scope.row)"/>
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:100%" @change="saveMoney(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="备注" min-width="200px">
|
||||
<el-table-column label="备注" align="center" prop="备注" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:180px" @change="saveRemarks(scope.$index, scope.row)"/>
|
||||
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:100%" @change="saveRemarks(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px">
|
||||
<el-table-column label="操作" align="center" width="110px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="物料移出" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出采购计划</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -11,18 +11,6 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!--<el-input v-model="Name" placeholder="供应商" size="small" clearable/>-->
|
||||
<span style="margin-left: 10px">时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:260px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>关联情况:</span>
|
||||
<el-select v-model="PickingValue" placeholder="关联情况" size="small" clearable>
|
||||
<el-option
|
||||
@@ -37,50 +25,49 @@
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card style="width: 45%;float: left">
|
||||
<h3>到货单</h3>
|
||||
<el-table v-loading="" :data="tableData4" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable5">
|
||||
<el-table-column width="60" align="center" type="index" label="序号"/>
|
||||
<el-table-column label="关联情况" align="center" min-width="280">
|
||||
<el-table v-loading="" :data="tableData4" border stripe style="width: 100%" height="230px" size="mini" highlight-current-row @row-click="searchTable5">
|
||||
<el-table-column label="关联情况" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</el-tag>
|
||||
<el-tag v-else type="primary" size="mini">未结算</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="280">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" prop="到货日期" align="center" width="150">
|
||||
<el-table-column label="到货日期" prop="到货日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="250" show-overflow-tooltip>
|
||||
<el-table-column label="到货单号" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
{{ scope.row.到货单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="220" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="添加到货明细" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="Number(scope.row.是否关联) === 1" type="success" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalOrderMX(scope.row)">添加到货明细</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-edit-outline" @click="editArrivalOrder(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">-->
|
||||
<!--<div style="display: inline-block">-->
|
||||
<!--<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-edit-outline" @click="editArrivalOrder(scope.row)"/>-->
|
||||
<!--</div>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">-->
|
||||
<!--<div style="display: inline-block">-->
|
||||
<!--<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)"/>-->
|
||||
<!--</div>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -93,6 +80,8 @@
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="width: 54%;float: left;margin-left: 10px">
|
||||
<h3>到货单明细</h3>
|
||||
<el-table
|
||||
v-loading=""
|
||||
@@ -103,6 +92,7 @@
|
||||
highlight-current-row
|
||||
stripe
|
||||
style="margin: 3px 0"
|
||||
height="260px"
|
||||
size="mini"
|
||||
@row-click="searchTable6">
|
||||
<el-table-column width="60" align="center" type="index" label="序号"/>
|
||||
@@ -128,21 +118,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
{{ parseInt(scope.row.金额 * 100) / 100 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="220" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="关联备料材料" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="disable === '1'" type="warning" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalCL(scope.row)">关联备料材料</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-edit-outline" @click="editArrivalMX(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalMX(scope.row)"/>
|
||||
@@ -151,6 +136,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card style="width: 100%">
|
||||
<h3>关联备料材料</h3>
|
||||
<el-table
|
||||
v-loading=""
|
||||
@@ -161,6 +148,7 @@
|
||||
highlight-current-row
|
||||
stripe
|
||||
style="margin: 3px 0"
|
||||
height="500px"
|
||||
size="mini">
|
||||
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
@@ -189,7 +177,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="总重量" align="center" prop="总重量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.总重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:120px" @change="save(scope.$index, scope.row)"/>
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" >
|
||||
@@ -199,7 +187,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" prop="总金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
{{ parseInt(scope.row.金额 * 100) / 100 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" >
|
||||
@@ -219,11 +207,11 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogVisible" center style="min-height: 200px" width="430px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
|
||||
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogVisible" center style="min-height: 400px" width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
||||
<el-row>
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-model="form.supplierNameValue" placeholder="供应商" size="small" filterable>
|
||||
<el-select v-show="title==='新增到货单'" v-model="form.supplierNameValue" placeholder="供应商" size="small" filterable @change="searchTable20()">
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
:key="item.value"
|
||||
@@ -233,7 +221,7 @@
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="创建日期" prop="invoiceTime">
|
||||
<el-form-item label="到货日期" prop="invoiceTime">
|
||||
<el-date-picker v-model="form.日期" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -258,120 +246,69 @@
|
||||
@click="submitEditArrivalOrder">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 200px" width="430px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="120px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible10" title="添加到货明细" center style="min-height: 400px" width="1600px">
|
||||
<el-form ref="form10" :model="form10" :rules="rules10" label-position="right" label-width="60px">
|
||||
<el-row>
|
||||
<el-form-item v-show="title1==='添加到货明细'" label="材料" prop="CailiaoValue">
|
||||
<el-input v-model="form1.CailiaoValue" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="数量" prop="数量">
|
||||
<el-input-number v-model="form1.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="单价" prop="单价">
|
||||
<el-input-number v-model="form1.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="单位" prop="单位">
|
||||
<el-input v-model="form1.单位" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="金额" prop="金额">
|
||||
<el-input-number v-model="form1.金额" :precision="2" :step="1" size="medium"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title1==='添加到货明细'"
|
||||
type="warning"
|
||||
size="small"
|
||||
plain
|
||||
icon="el-icon-check"
|
||||
@click="submitAddArrivalOrderMX">保存</el-button>
|
||||
<el-button
|
||||
v-show="title1==='添加到货明细'"
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddArrivalOrderMX1">继续添加</el-button>
|
||||
<el-button
|
||||
v-show="title1==='编辑到货明细'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEditArrivalOrderMX">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="关联备料材料" center style="min-height: 200px" width="55%">
|
||||
<div>
|
||||
<span>采购计划单号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
|
||||
<el-input v-model="partNumber" placeholder="零件图号" size="small" style="margin: 3px 0" clearable/>
|
||||
<el-select v-model="planType" placeholder="计划类型" size="small" filterable @change="ageCurrent2=1;pageSize2=10;total2=0;tableData3=[];searchTable2()">
|
||||
<el-col :span="5" style="margin-left: 27%">
|
||||
<span>计划类型</span>
|
||||
<el-select v-model="planType" placeholder="计划类型" size="small" style="width: 150px" filterable @change="searchTable20()">
|
||||
<el-option
|
||||
v-for="item in planTypes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">
|
||||
<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-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span>供应商</span>
|
||||
<el-input v-model="供应商名称" style="width: 250px" size="small" readonly/>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span>到货单编号</span>
|
||||
<el-input v-model="到货单编号" style="width: 150px" size="small" readonly/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style="width: 20%;float: left;margin-top: 5px">
|
||||
<div style="background: gainsboro">
|
||||
<el-row style="height: 50px">
|
||||
<el-form-item label="材料" prop="CailiaoValue">
|
||||
<el-input v-model="form10.CailiaoValue" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row style="height: 50px">
|
||||
<el-form-item label="数量" prop="数量">
|
||||
<el-input-number v-model="form10.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row style="height: 50px">
|
||||
<el-form-item label="单价" prop="单价">
|
||||
<el-input-number v-model="form10.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row style="height: 50px">
|
||||
<el-form-item label="单位" prop="单位">
|
||||
<el-input v-model="form10.单位" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row style="height: 50px">
|
||||
<el-form-item label="金额" prop="金额">
|
||||
<el-input-number v-model="form10.金额" :precision="2" :step="1" size="medium"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="采购计划单号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 ? scope.row.采购单号 : scope.row.离线采购计划编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购计划单名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单名称 ? scope.row.采购单名称 : scope.row.离线采购计划名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="planType===0" label="采购员" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="planType===0" label="计划完成日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划完成日期 ? scope.row.计划完成日期.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<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-button type="primary" size="small" style="margin-left: 40%;margin-top: 10px" @click="submitAddArrivalOrderMX">确定</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
</div>
|
||||
<div style="width: 79%;float: left;margin-left: 10px">
|
||||
<el-table v-loading="" :data="tableData20" border show-summary highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
<el-table-column label="采购单号" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
@@ -382,26 +319,155 @@
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" width="90px">
|
||||
<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="50px">
|
||||
<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">
|
||||
<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">
|
||||
<el-table-column label="到货件数" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货重量" align="center" width="110px" prop="到货重量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:90px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.成品尺寸 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" width="60px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 ? scope.row.单位 : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<!--<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 200px" width="430px">-->
|
||||
<!--<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="120px">-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item v-show="title1==='添加到货明细'" label="材料" prop="CailiaoValue">-->
|
||||
<!--<el-input v-model="form1.CailiaoValue" size="small"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="数量" prop="数量">-->
|
||||
<!--<el-input-number v-model="form1.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="单价" prop="单价">-->
|
||||
<!--<el-input-number v-model="form1.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="单位" prop="单位">-->
|
||||
<!--<el-input v-model="form1.单位" size="small"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row>-->
|
||||
<!--<el-form-item label="金额" prop="金额">-->
|
||||
<!--<el-input-number v-model="form1.金额" :precision="2" :step="1" size="medium"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-row>-->
|
||||
<!--</el-form>-->
|
||||
<!--<div slot="footer" class="dialog-footer">-->
|
||||
<!--<el-button-->
|
||||
<!--v-show="title1==='添加到货明细'"-->
|
||||
<!--type="warning"-->
|
||||
<!--size="small"-->
|
||||
<!--plain-->
|
||||
<!--icon="el-icon-check"-->
|
||||
<!--@click="submitAddArrivalOrderMX">保存</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-show="title1==='添加到货明细'"-->
|
||||
<!--type="primary"-->
|
||||
<!--plain-->
|
||||
<!--size="small"-->
|
||||
<!--icon="el-icon-check"-->
|
||||
<!--@click="submitAddArrivalOrderMX1">继续添加</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--v-show="title1==='编辑到货明细'"-->
|
||||
<!--type="primary"-->
|
||||
<!--size="small"-->
|
||||
<!--icon="el-icon-check"-->
|
||||
<!--@click="submitEditArrivalOrderMX">确定</el-button>-->
|
||||
<!--</div>-->
|
||||
<!--</el-dialog>-->
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="关联备料材料" center style="min-height: 400px" width="1400px">
|
||||
<span>计划类型</span>
|
||||
<el-select v-model="planType" placeholder="计划类型" size="small" style="width: 150px" filterable @change="searchTable20()">
|
||||
<el-option
|
||||
v-for="item in planTypes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-table v-loading="" :data="tableData20" border highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
<el-table-column label="采购单号" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="90px">
|
||||
<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="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货重量" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:90px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.成品尺寸 }}
|
||||
@@ -426,7 +492,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, saveWeight1, searchTable5,
|
||||
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5,
|
||||
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
@@ -456,6 +522,7 @@ export default {
|
||||
Name: '',
|
||||
单价: '',
|
||||
数量: '',
|
||||
供应商: '',
|
||||
SUM: 0,
|
||||
PickingValue: '',
|
||||
Picking: [{
|
||||
@@ -472,8 +539,9 @@ export default {
|
||||
total2: 0,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
tableData3: [],
|
||||
tableData6: [],
|
||||
tableData20: [],
|
||||
tableData30: [],
|
||||
采购计划流水号: '',
|
||||
离线采购计划流水号: '',
|
||||
tableData4: [],
|
||||
@@ -482,16 +550,21 @@ export default {
|
||||
pageSize4: 10,
|
||||
tableData5: [],
|
||||
到货单流水号: '',
|
||||
dateRange: '',
|
||||
中间变量: '',
|
||||
form: {
|
||||
supplierNameValue: '',
|
||||
备注: '',
|
||||
日期: '',
|
||||
supplierNameValue: ''
|
||||
日期: ''
|
||||
},
|
||||
form1: {
|
||||
CailiaoValue: '',
|
||||
材料: '',
|
||||
数量: '',
|
||||
单位: 'KG',
|
||||
单价: '',
|
||||
金额: ''
|
||||
},
|
||||
form10: {
|
||||
CailiaoValue: '',
|
||||
数量: '',
|
||||
单位: 'KG',
|
||||
单价: '',
|
||||
@@ -501,6 +574,7 @@ export default {
|
||||
supplierNames: [],
|
||||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
dialogVisible10: false,
|
||||
dialogVisible2: false,
|
||||
title: '',
|
||||
title1: '',
|
||||
@@ -510,15 +584,23 @@ export default {
|
||||
日期: [{ required: true, message: '请选择日期' }]
|
||||
},
|
||||
rules1: {
|
||||
CailiaoValue: [{ required: true, message: '请选择材料' }],
|
||||
CailiaoValue: [{ required: true, message: '请填写材料' }],
|
||||
数量: [{ required: true, message: '请填写数量' }],
|
||||
单位: [{ required: true, message: '请填写单位' }],
|
||||
单价: [{ required: true, message: '请填写单价' }]
|
||||
},
|
||||
rules10: {
|
||||
CailiaoValue: [{ required: true, message: '请填写材料' }],
|
||||
数量: [{ required: true, message: '请填写数量' }],
|
||||
单位: [{ required: true, message: '请填写单位' }],
|
||||
单价: [{ required: true, message: '请填写单价' }]
|
||||
},
|
||||
本次到货数量组: [],
|
||||
到货重量组: [],
|
||||
工艺计划流水号组: [],
|
||||
采购计划明细流水号组: [],
|
||||
离线采购计划明细流水号组: []
|
||||
离线采购计划明细流水号组: [],
|
||||
到货金额组: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -546,6 +628,17 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable20() {
|
||||
if (this.planType === 0) {
|
||||
searchMateriel(this.供应商).then(response => {
|
||||
this.tableData20 = response.data
|
||||
})
|
||||
} else {
|
||||
searchLxMateriel(this.供应商).then(response => {
|
||||
this.tableData20 = response.data
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2() { // 查询采购单列表
|
||||
if (this.planType === 0) {
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
@@ -573,20 +666,6 @@ export default {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable3(row) { // 查询采购计划明细
|
||||
this.采购计划流水号 = row.采购计划流水号
|
||||
this.离线采购计划流水号 = row.离线采购计划流水号
|
||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||
if (this.planType === 0) {
|
||||
searchMateriel(this.采购计划流水号, this.check5, this.partNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else {
|
||||
searchLxMateriel(this.离线采购计划流水号, this.check5, this.partNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
@@ -618,7 +697,7 @@ export default {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
return parseInt((Number(prev) + Number(curr)) * 100) / 100
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
@@ -644,7 +723,7 @@ export default {
|
||||
sums[index] = '绑定重量:'
|
||||
return
|
||||
} else if (index === 6) {
|
||||
const values = data.map(item => Number(item['总重量']))
|
||||
const values = data.map(item => Number(item['重量']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
@@ -662,7 +741,7 @@ export default {
|
||||
sums[index] = '总金额:'
|
||||
return
|
||||
} else if (index === 8) {
|
||||
const values = data.map(item => Number(item['总金额']))
|
||||
const values = data.map(item => Number(item['金额']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
@@ -685,65 +764,18 @@ export default {
|
||||
this.tableData5 = []
|
||||
this.tableData6 = []
|
||||
this.supplierNameValue ? this.check = 1 : this.check = 0
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
if (this.PickingValue === 0 || this.PickingValue === 1) {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
searchArriveOrder(this.check, this.supplierNameValue, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.PickingValue, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
searchArriveOrder(this.check, this.supplierNameValue, this.check2, this.PickingValue, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
this.tableData4 = response.data.rows
|
||||
this.total4 = response.data.total
|
||||
})
|
||||
},
|
||||
save(index, row) {
|
||||
this.SUM = 0
|
||||
this.ALLMoney = parseInt(row.总重量 * this.单价 * 100) / 100
|
||||
for (let i = 0; i < this.tableData6.length; i++) {
|
||||
this.SUM += parseFloat(this.tableData6[i].总重量)
|
||||
}
|
||||
if (this.数量 - this.SUM < 0) {
|
||||
this.$message.warning('总重量已超出上限')
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
this.tableData6 = response.data
|
||||
if (response.data.length !== 0) {
|
||||
this.未绑定数量 = response.data[0].未绑定数量
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (row.采购计划明细流水号) {
|
||||
saveWeight(row.采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('录入成功')
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
this.tableData6 = response.data
|
||||
if (response.data.length !== 0) {
|
||||
this.未绑定数量 = response.data[0].未绑定数量
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('录入失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
saveWeight1(row.离线采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('录入成功')
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
this.tableData6 = response.data
|
||||
if (response.data.length !== 0) {
|
||||
this.未绑定数量 = response.data[0].未绑定数量
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('录入失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
Calculation() {
|
||||
this.form1.金额 = this.form1.单价 * this.form1.数量
|
||||
this.form10.金额 = this.form10.单价 * this.form10.数量
|
||||
},
|
||||
handleSizeChange4(val) { // 采购单列表分页
|
||||
this.pageSize4 = val
|
||||
@@ -799,13 +831,12 @@ export default {
|
||||
this.title = '编辑到货单'
|
||||
this.form.备注 = row.备注
|
||||
this.form.日期 = row.日期
|
||||
this.form.supplierNameValue = row.供应商流水号
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submitEditArrivalOrder() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
editPurchaseOrder(this.form.备注, this.到货单流水号, this.form.supplierNameValue, this.form.日期).then(response => {
|
||||
editPurchaseOrder(this.form.备注, this.到货单流水号, this.form.日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改到货单成功')
|
||||
this.searchTable4()
|
||||
@@ -850,32 +881,57 @@ export default {
|
||||
})
|
||||
},
|
||||
addArrivalOrderMX(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
if (this.$refs['form10'] !== undefined) {
|
||||
this.$refs['form10'].resetFields()
|
||||
}
|
||||
this.供应商111 = row.供应商流水号
|
||||
this.title1 = '添加到货明细'
|
||||
this.form1.CailiaoValue = ''
|
||||
this.form1.数量 = ''
|
||||
this.form1.单价 = ''
|
||||
this.form1.金额 = ''
|
||||
this.form10.CailiaoValue = ''
|
||||
this.form10.数量 = ''
|
||||
this.form10.单价 = ''
|
||||
this.form10.金额 = ''
|
||||
this.供应商 = row.供应商流水号
|
||||
this.供应商名称 = row.供应商名称
|
||||
this.到货单编号 = row.到货单编号
|
||||
this.ArrivalOrderNumber = row.到货单流水号
|
||||
this.dialogVisible1 = true
|
||||
this.dialogVisible10 = true
|
||||
this.searchTable20()
|
||||
},
|
||||
submitAddArrivalOrderMX() {
|
||||
if (this.form1.数量 > 0) {
|
||||
this.form1.金额 = this.form1.数量 * this.form1.单价
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (this.form10.数量 > 0) {
|
||||
this.form10.金额 = this.form10.数量 * this.form10.单价
|
||||
this.$refs['form10'].validate((valid) => {
|
||||
if (valid) {
|
||||
AddArrivalOrderMX(this.ArrivalOrderNumber, this.form1.CailiaoValue, this.form1.数量, this.form1.单位, this.form1.单价, this.form1.金额).then(response => {
|
||||
if (this.arrest.length === 0) {
|
||||
this.$message.warning('请勾选要绑定的材料')
|
||||
} else {
|
||||
this.工艺计划流水号组 = []
|
||||
this.采购计划明细流水号组 = []
|
||||
this.离线采购计划明细流水号组 = []
|
||||
this.本次到货数量组 = []
|
||||
this.到货重量组 = []
|
||||
this.到货金额组 = []
|
||||
this.arrest.map(v => {
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.采购计划明细流水号组.push(v.采购计划明细流水号)
|
||||
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
|
||||
this.本次到货数量组.push(v.未到货数量)
|
||||
this.到货重量组.push(v.到货重量)
|
||||
this.到货金额组.push(v.到货重量 * this.form10.单价)
|
||||
})
|
||||
AddArrivalOrderMX(this.ArrivalOrderNumber, this.form10.CailiaoValue, this.form10.数量, this.form10.单位, this.form10.单价, this.form10.金额, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.到货重量组, this.到货金额组, this.userId).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新增到货材料成功')
|
||||
this.form10.CailiaoValue = ''
|
||||
this.form10.数量 = ''
|
||||
this.form10.单价 = ''
|
||||
this.form10.金额 = ''
|
||||
this.searchTable20()
|
||||
searchTable5(this.ArrivalOrderNumber).then(response => {
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
// this.dialogVisible1 = false
|
||||
} else { this.$message.error('新建到货单失败') }
|
||||
})
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
@@ -885,7 +941,6 @@ export default {
|
||||
}
|
||||
},
|
||||
submitAddArrivalOrderMX1() {
|
||||
this.searchCailiao()
|
||||
this.form1.CailiaoValue = ''
|
||||
this.form1.数量 = ''
|
||||
this.form1.单价 = ''
|
||||
@@ -895,8 +950,6 @@ export default {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.供应商111 = row.供应商流水号
|
||||
this.searchCailiao()
|
||||
this.title1 = '编辑到货明细'
|
||||
// this.form1.CailiaoValue = row.材料
|
||||
this.form1.数量 = row.数量
|
||||
@@ -959,11 +1012,11 @@ export default {
|
||||
})
|
||||
},
|
||||
addArrivalCL(row) {
|
||||
this.supplierName0 = row.供应商流水号
|
||||
this.供应商 = row.供应商流水号
|
||||
this.ArrivalOrderMXNumber = row.到货单明细流水号
|
||||
this.tableData3 = []
|
||||
this.单价 = row.单价
|
||||
this.dialogVisible2 = true
|
||||
this.searchTable2()
|
||||
this.searchTable20()
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.arrest = val
|
||||
@@ -980,18 +1033,20 @@ export default {
|
||||
this.采购计划明细流水号组 = []
|
||||
this.离线采购计划明细流水号组 = []
|
||||
this.本次到货数量组 = []
|
||||
this.到货重量组 = []
|
||||
this.到货金额组 = []
|
||||
this.arrest.map(v => {
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.采购计划明细流水号组.push(v.采购计划明细流水号)
|
||||
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
|
||||
this.本次到货数量组.push(v.未到货数量)
|
||||
this.到货重量组.push(v.到货重量)
|
||||
this.到货金额组.push(v.到货重量 * this.单价)
|
||||
})
|
||||
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.userId).then(response => {
|
||||
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.到货重量组, this.到货金额组, this.userId).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('关联成功')
|
||||
searchMateriel(this.采购计划流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.searchTable20()
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
this.tableData6 = response.data
|
||||
if (response.data.length !== 0) {
|
||||
|
||||
@@ -32,80 +32,38 @@
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()">查询</el-button>
|
||||
</el-tooltip>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">新增发票</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card style="width: 58%;float: left">
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
size="mini"
|
||||
style="margin-top: 3px"
|
||||
height="550px"
|
||||
height="750px"
|
||||
stripe
|
||||
border
|
||||
highlight-current-row
|
||||
@expand-change="searchTable02">
|
||||
<el-table-column type="expand" label="详情">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="gridData" class="subTableHeader" show-summary stripe border size="mini" style="width: 40%">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="供应商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="到货日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" prop="到货金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip effect="dark" content="取消关联" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteTable10(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发票状态" min-width="100px">
|
||||
@row-click="searchTable02">
|
||||
<el-table-column align="center" label="发票状态" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否请款) === 0" type="warning" size="mini">未请款</el-tag>
|
||||
<el-tag v-else-if="Number(scope.row.是否请款) === 1" type="primary" size="mini">已请款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发票号" min-width="120px">
|
||||
<el-table-column align="center" label="发票号" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" prop="开票时间" min-width="100px">
|
||||
<el-table-column align="center" label="开票时间" prop="开票时间" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px">
|
||||
<el-table-column align="center" label="开票金额" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
@@ -171,10 +129,50 @@
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="400px">
|
||||
<el-card style="float: left;width: 41.3%;margin-left: 5px">
|
||||
<el-table :data="gridData" class="subTableHeader" show-summary stripe border size="mini" style="width: 100%">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="供应商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center" label="到货日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</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 min-width="100" align="center" label="备注">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip effect="dark" content="取消关联" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteTable10(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="1400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-width="110px">
|
||||
<div style="width: 25%;float: left;margin-top: 5px">
|
||||
<div style="background: gainsboro">
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable>
|
||||
<el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable @change="Name=form1.supplierNameValue;pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">
|
||||
<el-option
|
||||
v-for="item in supplierNames"
|
||||
:key="item.value"
|
||||
@@ -194,6 +192,61 @@
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form1.remark" size="small"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 74%;float: left;margin-left: 5px">
|
||||
<div>
|
||||
<span style="margin-left: 10px">时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:260px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询到货单" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">查询</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData4" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="供应商" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent4"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize4"
|
||||
:total="total4"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
@@ -282,7 +335,7 @@ export default {
|
||||
Name: '',
|
||||
arrest: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
pageSize1: 30,
|
||||
total1: 0,
|
||||
pageCurrent4: 1,
|
||||
pageSize4: 10,
|
||||
@@ -303,7 +356,6 @@ export default {
|
||||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
expands: [],
|
||||
form1: {
|
||||
supplierNameValue: '',
|
||||
Number: '',
|
||||
@@ -399,29 +451,11 @@ export default {
|
||||
this.searchTable4()
|
||||
},
|
||||
searchTable02(row) { // 查看详情(发票包含的合同)
|
||||
if (this.a === 1) {
|
||||
this.expands.push(row.发票流水号)
|
||||
this.b = row.发票流水号
|
||||
this.a = 0
|
||||
} else {
|
||||
if (this.b === row.发票流水号) {
|
||||
this.expands = []
|
||||
this.a = 1
|
||||
} else {
|
||||
this.expands = []
|
||||
this.expands.push(row.发票流水号)
|
||||
this.a = 0
|
||||
this.b = row.发票流水号
|
||||
}
|
||||
}
|
||||
this.发票流水号 = row.发票流水号
|
||||
searchInvoiceDetail(this.发票流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.发票流水号
|
||||
},
|
||||
addTable1() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
@@ -438,13 +472,23 @@ export default {
|
||||
submitAdd1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addInvoice(this.form1.invoiceTime, this.form1.money, this.form1.Number, this.form1.remark, this.form1.supplierNameValue).then(response => {
|
||||
if (this.arrest.length === 0) {
|
||||
this.$message.warning('请勾选需要关联的到货单')
|
||||
} else {
|
||||
this.到货单流水号组 = []
|
||||
this.arrest.map(v => {
|
||||
this.到货单流水号组.push(v.到货单流水号)
|
||||
})
|
||||
addInvoice(this.form1.invoiceTime, this.form1.money, this.form1.Number, this.form1.remark, this.form1.supplierNameValue, this.到货单流水号组).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('增加失败') }
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
@@ -526,7 +570,9 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('关联成功')
|
||||
this.dialogVisible = false
|
||||
this.tableData4 = []
|
||||
searchInvoiceDetail(this.发票流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
} else { this.$message.error('关联失败') }
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user