This commit is contained in:
liushuai
2019-11-22 17:21:14 +08:00
11 changed files with 683 additions and 688 deletions

View File

@@ -21,7 +21,7 @@ export function edittype(ManufacturerNumber, ManufacturerName, ManufacturerAbbre
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_增加数据',
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&银行=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
@@ -33,7 +33,7 @@ export function handlechange(CoManufacturerFlowNumber, ManufacturerNumber, Manuf
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&银行=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}

View File

@@ -61,14 +61,14 @@ export function payment(num) {
})
}
// 查询零件信息
export function getParts(Number, pageCurrent, pageSize) {
export function getParts(check, Number, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_外协发票管理_查询数据',
param: '外协厂家流水号=' + Number + '=int',
param: '外协厂家流水号_check=' + check + '&外协厂家流水号=' + Number + '=int',
Pagination: pageCurrent + '&' + pageSize
}
})
@@ -81,7 +81,7 @@ export function edittype(num1, num2, num3, num4, num5, num6, num7, num8) {
data: {
type: '2',
name: '车间生产管理工艺_外协发票管理_增加数据',
param: '外协加工任务单流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
param: '外协厂家流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
}
})
}

View File

@@ -1,5 +1,16 @@
import request from '@/utils/request'
// 初始化 外协厂商
export function initOutHelp() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_外协厂家_查询数据'
}
})
}
// 初始化获取已生成的外协加工任务单
export function getTable(checked, contractNumber, checked1, manufacturers, checked2, time1, time2, num, pageCurrent, pageSize, documentStatus, num3) {
return request({

View File

@@ -80,3 +80,15 @@ export function edit2(num1, num2, num3) {
}
})
}
// 保存每行价格
export function saveRowPrice(num1, price1, num2, price2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_序间外协预算价格_系数',
param: '工序流水号=' + num1 + '&外协预算价格=' + price1 + '&工艺计划流水号=' + num2 + '&材料费=' + price2
}
})
}

View File

@@ -18,7 +18,7 @@ export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` //
export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx`
export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx`
export const url = `http://192.168.1.231:8411/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
export const ExcelDownLoad = 'http://192.168.1.231:8411/submit/downloadFile.ashx' // 导出excel
export const ExcelDownLoad = 'http://192.168.0.110:8002/submit/downloadFile.ashx' // 导出excel
// 技术中心程序发布时要更改下面所有的IP到0段
export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231

View File

@@ -43,6 +43,11 @@
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column label="银行" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.银行 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
@@ -109,8 +114,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="传真" prop="Fax">
<el-input v-model="form.Fax" placeholder="传真" clearable size="small"/>
<el-form-item label="银行" prop="Fax">
<el-input v-model="form.Fax" placeholder="银行" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>
@@ -321,7 +326,7 @@ export default {
this.form.address = row.地址
this.form.roleName = row.联系人
this.form.phNumber = row.电话
this.form.Fax = row.传真
this.form.Fax = row.银行
this.form.Remarks = row.备注
this.form.category = row.类别
this.form.EquipmentCondition = row.设备情况

View File

@@ -1,31 +1,48 @@
<template>
<div class="app-container">
<!--<el-card>-->
<!--<span>表单号:</span>-->
<!--<el-input v-model="FormNumber" placeholder="表单号" clearable size="small" style="width:190px;margin:10px;"/>-->
<!--<span>任务下达时间段:</span>-->
<!--<el-date-picker-->
<!--v-model="date1"-->
<!--style="width:190px;margin:10px;"-->
<!--size="small"-->
<!--type="date"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--placeholder="选择日期"/>-->
<!--<span>~</span>-->
<!--<el-date-picker-->
<!--v-model="date2"-->
<!--style="width:190px;margin:10px;"-->
<!--size="small"-->
<!--type="date"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--placeholder="选择日期"/>-->
<!--<span>实际付款时间段:</span>-->
<!--<el-date-picker-->
<!--v-model="date3"-->
<!--style="width:190px;margin:10px;"-->
<!--size="small"-->
<!--type="date"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--placeholder="选择日期"/>-->
<!--<span>~</span>-->
<!--<el-date-picker-->
<!--v-model="date4"-->
<!--style="width:190px;margin:10px;"-->
<!--size="small"-->
<!--type="date"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--placeholder="选择日期"/>-->
<!--</el-card>-->
<el-card>
<el-row>
<span>表单号:</span>
<el-input v-model="FormNumber" placeholder="表单号" clearable size="small" style="width:190px;margin:10px;"/>
<span>任务下达时间段:</span>
<el-date-picker
v-model="date1"
style="width:190px;margin:10px;"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>~</span>
<el-date-picker
v-model="date2"
style="width:190px;margin:10px;"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
</el-row>
<el-row>
<span>厂家名:</span>
<span>厂家:</span>
<el-select v-model="ManufacturerNameValue" placeholder="选择外协厂家" filterable clearable size="small" style="width:190px;margin:10px;">
<el-option
v-for="item in ManufacturerName"
@@ -33,52 +50,57 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>实际付款时间段:</span>
<el-date-picker
v-model="date3"
style="width:190px;margin:10px;"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>~</span>
<el-date-picker
v-model="date4"
style="width:190px;margin:10px;"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;total=null;pageCurrent2=1;pageSize2=10;total2=null;searchTable()">查询</el-button>
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=20;searchTable()">查询</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" size="mini" stripe style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中" @row-click="getParts">
<el-table v-loading="loading" :data="tableData" height="500" size="mini" stripe style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中">
<el-table-column label="序号" type="index" align="center" fixed="left" width="50"/>
<el-table-column label="付款状态" prop="实际付款时间" width="100" align="center" fixed="left">
<el-table-column label="付款" prop="实际付款时间" width="65" align="center" fixed="left">
<template slot-scope="scope">
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small">已付</el-tag>
<el-tag v-else type="info" size="small">未付</el-tag>
</template>
</el-table-column>
<el-table-column label="到货状态" prop="单据状态" width="100" align="center" fixed="left">
<el-table-column label="到货" prop="单据状态" width="65" align="center" fixed="left">
<template slot-scope="scope">
<el-tag v-if="scope.row.单据状态==='3'" type="success" size="small">已到</el-tag>
<el-tag v-else type="info" size="small">未到</el-tag>
</template>
</el-table-column>
<el-table-column label="单号" prop="表单号" align="center" min-width="200px" fixed="left">
<el-table-column label="单号" prop="表单号" align="center" width="180px" fixed="left">
<template slot-scope="scope">
{{ scope.row.表单号 }}
</template>
</el-table-column>
<el-table-column label="外协厂家" prop="外协厂家名称" align="center" min-width="200px">
<el-table-column label="外协厂家" prop="外协厂家名称" align="center" min-width="190px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.外协厂家名称 }}
</template>
</el-table-column>
<el-table-column label="总价" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
<el-table-column label="质量扣款" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_质量 }}
</template>
</el-table-column>
<el-table-column label="计划扣款" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_计划 }}
</template>
</el-table-column>
<el-table-column label="其他扣款" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_其他 }}
</template>
</el-table-column>
<el-table-column label="应付金额" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.应付总额 }}
</template>
</el-table-column>
<el-table-column label="任务下达日期" prop="任务下达日期" align="center" min-width="125px">
<template slot-scope="scope">
{{ scope.row.任务下达日期 }}
@@ -89,93 +111,65 @@
{{ scope.row.外协员姓名 }}
</template>
</el-table-column>
<el-table-column label="加工价格" align="center">
<el-table-column label="预算总价" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.加工价格_预算_总价 }}
</template>
</el-table-column>
<el-table-column label="成交总价" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.加工价格_成交_总价 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="材料费" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.材料价格_价格_总价 }}
</template>
</el-table-column>
<el-table-column label="运费" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.运费 }}
</template>
</el-table-column>
<el-table-column label="其他费用" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.其他价格_总价 }}
</template>
</el-table-column>
<el-table-column label="总价" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
<el-table-column label="扣款" align="center">
<el-table-column label="质量" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_质量 }}
</template>
</el-table-column>
<el-table-column label="计划" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_计划 }}
</template>
</el-table-column>
<el-table-column label="其他" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_其他 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="应付金额" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.应付总额 }}
</template>
</el-table-column>
<el-table-column label="付款日期" align="center" width="240px">
<el-table-column label="入库" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
</template>
</el-table-column>
<el-table-column label="计划" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.计划付款时间 }}
</template>
</el-table-column>
<el-table-column label="实际" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.实际付款时间 }}
</template>
</el-table-column>
</el-table-column>
<!--<el-table-column label="加工价格" align="center">-->
<!--<el-table-column label="预算总价" align="center" width="85px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.加工价格_预算_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="成交总价" align="center" width="85px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.加工价格_成交_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table-column>-->
<!--<el-table-column label="材料费" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.材料价格_价格_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="运费" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.运费 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="其他费用" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.其他价格_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="总价" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="付款日期" align="center" width="240px">-->
<!--<el-table-column label="入库" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.入库时间 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="计划" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.计划付款时间 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="实际" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.实际付款时间 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table-column>-->
<el-table-column label="扣款说明" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.扣款说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="280px" fixed="right">
<el-table-column label="操作" align="center" width="200px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="记录外协付款到票信息" placement="top">
<el-button
:disabled="scope.row.实际付款时间!==''"
size="mini"
type="primary"
plain
class="el-icon-check"
@click="editType1(scope.row, 'form');param = 0">到票</el-button>
</el-tooltip>
<!--<el-tooltip :open-delay="1200" effect="dark" content="记录外协付款到票信息" placement="top">-->
<!--<el-button :disabled="scope.row.实际付款时间!==''" size="mini" type="primary" plain class="el-icon-check" @click="editType1(scope.row, 'form');param = 0">到票</el-button>-->
<!--</el-tooltip>-->
<el-tooltip :open-delay="1200" effect="dark" content="记录外协扣款信息" placement="top">
<el-button
:disabled="scope.row.实际付款时间!==''"
@@ -200,7 +194,7 @@
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-sizes="[20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@@ -210,35 +204,54 @@
</el-card>
<el-card>
<el-row>
<span>厂家:</span>
<el-select v-model="ManufacturerNameValue2" placeholder="选择外协厂家" filterable clearable size="small" style="width:190px;margin:10px;">
<el-option
v-for="item in ManufacturerName2"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent2=1;pageSize2=20;getParts()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="记录外协付款到票信息" placement="top">
<el-button size="small" type="primary" plain class="el-icon-check" @click="editType1('form');param = 0">到票</el-button>
</el-tooltip>
</el-row>
<el-table v-loading="loading2" :data="tableData2" :summary-method="getSummaries" size="mini" stripe height="370" show-summary style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="厂家" prop="发票号" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.外协厂家名称 }}
</template>
</el-table-column>
<el-table-column label="发票号" prop="发票号" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column label="接收人" prop="接收人" align="center" width="180px">
<template slot-scope="scope">
{{ scope.row.接收人 }}
</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="150px" prop="开票金额">
<!--<el-table-column label="接收人" prop="接收人" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.接收人 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="开户行" align="center" width="150px" show-overflow-tooltip="">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.开户行 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="开票金额" align="center" width="100px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="开票日期" align="center">
<el-table-column label="开票日期" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
{{ scope.row.开票时间 === '1900/1/1' ? '-' : scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column label="接收日期" align="center">
<el-table-column label="接收日期" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.接收时间 }}
{{ scope.row.接收时间 === '1900/1/1' ? '-' : scope.row.接收时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
@@ -246,22 +259,10 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right">
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope">
<el-button
:disabled="fukuanshijian!==''"
size="mini"
type="primary"
plain
class="el-icon-edit"
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
<el-button
:disabled="fukuanshijian!==''"
size="mini"
type="danger"
plain
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
<el-button size="mini" type="primary" plain class="el-icon-edit" @click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
<el-button size="mini" type="danger" plain class="el-icon-delete" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -269,7 +270,7 @@
<el-pagination
v-if="!loading2"
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-sizes="[20, 30, 40]"
:page-size="pageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@@ -301,6 +302,19 @@
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="700px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
<el-row v-show="title1==='到票'">
<el-col :span="12">
<el-form-item label="外协厂家" prop="外协厂家" >
<el-select v-model="form.外协厂家" placeholder="外协厂家" filterable clearable size="small">
<el-option
v-for="item in 外协厂家"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="发票号" prop="发票号" >
@@ -381,6 +395,7 @@ export default {
count1: 0,
count2: 0,
form: {
外协厂家: '',
发票号: '',
开户行: '',
开票时间: '',
@@ -389,6 +404,7 @@ export default {
接收时间: '',
备注: ''
},
外协厂家: [],
实际付款时间: '',
loading: false,
loading2: false,
@@ -401,6 +417,7 @@ export default {
扣款说明: ''
},
rules: {
外协厂家: [{ required: true, message: '请选择外协厂家', trigger: 'change' }],
发票号: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
开票金额: [{ required: true, message: '请输入开票金额', trigger: 'blur' }],
扣款说明: [{ required: true, message: '请输入扣款说明', trigger: 'blur' }]
@@ -412,23 +429,26 @@ export default {
FormNumber: '',
ManufacturerNameValue: '',
ManufacturerName: [], // 厂家名称
ManufacturerNameValue2: '',
ManufacturerName2: [], // 厂家名称
FormNumber_check: false,
ManufacturerNameValue_check: false,
date1_check: false,
date3_check: false,
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageSize: 20, // 每页显示条数
pageCurrent: 1, // 后台获取页
tableData2: [], // 表格数据
total2: null, // 总条数
pageSize2: 10, // 每页显示条数
pageSize2: 20, // 每页显示条数
pageCurrent2: 1 // 后台获取页
}
},
created() {
this.fetchData()
this.searchTable()
this.getParts()
},
methods: {
getSummaries(param) {
@@ -459,12 +479,22 @@ export default {
// 初始化外协厂家
fetchData() {
this.ManufacturerName = []
this.ManufacturerName2 = []
this.外协厂家 = []
initOutHelp().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ManufacturerName.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
this.ManufacturerName2.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
this.外协厂家.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
}
})
},
@@ -492,7 +522,6 @@ export default {
this.date3_check = true
}
this.tableData = []
this.tableData2 = []
searchtable(this.FormNumber_check, this.FormNumber, this.ManufacturerNameValue_check, this.ManufacturerNameValue, this.date1_check, this.date1, this.date2, this.date3_check, this.date3, this.date4, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].任务下达日期 = response.data.rows[i].任务下达日期.substring(0, response.data.rows[i].任务下达日期.indexOf(' '))
@@ -574,15 +603,14 @@ export default {
this.$refs[formName].resetFields()
},
// 获取表格2数据
getParts(row) {
getParts() {
this.loading2 = true
this.tableData2 = []
this.zhongjianbianliang = row.外协加工任务单流水号
this.fukuanshijian = row.实际付款时间
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
if (response.data.rows.length === 0) {
let check
this.ManufacturerNameValue2 ? check = 1 : check = 0
getParts(check, this.ManufacturerNameValue2, this.pageCurrent2, this.pageSize2).then(response => {
this.loading2 = false
} else {
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].开票时间 = response.data.rows[i].开票时间.substring(0, response.data.rows[i].开票时间.indexOf(' '))
response.data.rows[i].接收时间 = response.data.rows[i].接收时间.substring(0, response.data.rows[i].接收时间.indexOf(' '))
@@ -590,8 +618,6 @@ export default {
this.tableData2 = response.data.rows
this.total2 = response.data.total
}
}).then(() => {
this.loading2 = false
})
},
getParts2() {
@@ -609,13 +635,13 @@ export default {
})
},
// 点击增加
editType1(row, formName) {
editType1(formName) {
this.count1 = this.count1 + 1
if (this.count1 !== 1) {
this.$refs[formName].resetFields()
}
this.title1 = '到票'
this.renwudan = row.外协加工任务单流水号
// this.renwudan = row.外协加工任务单流水号
this.form.发票号 = ''
this.form.开户行 = ''
this.form.开票时间 = ''
@@ -623,18 +649,19 @@ export default {
this.form.接收人 = ''
this.form.接收时间 = ''
this.form.备注 = ''
this.form.外协厂家 = ''
this.dialogFormVisible = true
},
// 增加确定
editType() {
edittype(this.renwudan, this.form.发票号, this.form.开户行, this.form.开票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
edittype(this.form.外协厂家, this.form.发票号, this.form.开户行, this.form.开票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息增加成功',
type: 'success'
})
this.getParts2()
this.getParts()
} else {
this.$message.error('信息增加失败')
}
@@ -647,6 +674,13 @@ export default {
if (this.count2 !== 1) {
this.$refs[formName].resetFields()
}
if (row.开票时间 === '1900/1/1') {
row.开票时间 = ''
}
if (row.接收时间 === '1900/1/1') {
row.接收时间 = ''
}
this.form.外协厂家 = row.外协厂家流水号
this.form.发票号 = row.发票号
this.form.开户行 = row.开户行
this.form.开票时间 = row.开票时间
@@ -667,7 +701,7 @@ export default {
message: '信息修改成功',
type: 'success'
})
this.getParts2()
this.getParts()
} else {
this.$message.error('信息修改失败')
}
@@ -710,7 +744,7 @@ export default {
message: '信息删除成功',
type: 'success'
})
this.getParts2()
this.getParts()
} else {
this.$message.error('信息删除失败')
}
@@ -735,12 +769,12 @@ export default {
handleSizeChange2(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.getParts2()
this.getParts()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.tableData2 = []
this.getParts2()
this.getParts()
}
}
}

View File

@@ -4,50 +4,126 @@
<el-card>
<span>零件号:</span>
<el-input v-model="partNum" placeholder="零件号" size="small" clearable style="width:200px"/>
<span>厂家:</span>
<el-select v-model="ManufacturerNameValue" placeholder="选择外协厂家" filterable clearable size="small" style="width:190px;margin:10px;">
<el-option
v-for="item in ManufacturerName"
: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="PageCurrent=1;PageSize=10;searchTable()">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="loading0" :data="tableData" border style="width: 100%;" height="650" stripe>
<el-table-column label="机床图号" width="180px" align="center">
<el-table v-loading="loading0" :data="tableData" height="550" size="mini" stripe style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="序号" type="index" align="center" fixed="left" width="50"/>
<el-table-column label="付款" prop="实际付款时间" width="65" align="center" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small">已付</el-tag>
<el-tag v-else type="info" size="small">未付</el-tag>
</template>
</el-table-column>
<el-table-column label="组号" width="100px" align="center">
<el-table-column label="到货" prop="单据状态" width="65" align="center" fixed="left">
<template slot-scope="scope">
{{ scope.row.组号 }}
<el-tag v-if="scope.row.单据状态==='3'" type="success" size="small">已到</el-tag>
<el-tag v-else type="info" size="small">未到</el-tag>
</template>
</el-table-column>
<el-table-column label="零件图号" width="250px" align="center">
<el-table-column label="单据号" prop="表单号" align="center" width="180px" fixed="left">
<template slot-scope="scope">
{{ scope.row.零件图 }}
{{ scope.row.表单 }}
</template>
</el-table-column>
<el-table-column label="零件名称" width="100px" align="center">
<el-table-column label="外协厂家" prop="外协厂家名称" align="center" min-width="190px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
{{ scope.row.外协厂家名称 }}
</template>
</el-table-column>
<el-table-column label="数量" width="100px" align="center">
<el-table-column label="总价" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
{{ scope.row.总价 }}
</template>
</el-table-column>
<!--<el-table-column label="已入库数量" width="100px" align="center">-->
<el-table-column label="质量扣款" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_质量 }}
</template>
</el-table-column>
<el-table-column label="计划扣款" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_计划 }}
</template>
</el-table-column>
<el-table-column label="其他扣款" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.扣款_其他 }}
</template>
</el-table-column>
<el-table-column label="应付金额" align="center" min-width="70px">
<template slot-scope="scope">
{{ scope.row.应付总额 }}
</template>
</el-table-column>
<el-table-column label="任务下达日期" prop="任务下达日期" align="center" min-width="125px">
<template slot-scope="scope">
{{ scope.row.任务下达日期 }}
</template>
</el-table-column>
<el-table-column label="外协员" prop="外协员姓名" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.外协员姓名 }}
</template>
</el-table-column>
<!--<el-table-column label="加工价格" align="center">-->
<!--<el-table-column label="预算总价" align="center" width="85px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.入库数量 }}-->
<!--{{ scope.row.加工价格_预算_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="零件状态" align="center" >
<!--<el-table-column label="成交总价" align="center" width="85px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.加工价格_成交_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table-column>-->
<!--<el-table-column label="材料费" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.材料价格_价格_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="运费" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.运费 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="其他费用" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.其他价格_总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="总价" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.总价 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="付款日期" align="center" width="240px">-->
<!--<el-table-column label="入库" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.入库时间 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="计划" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.计划付款时间 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="实际" align="center" min-width="70px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.实际付款时间 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table-column>-->
<el-table-column label="扣款说明" align="center" min-width="120px">
<template slot-scope="scope">
<el-steps :active="active[scope.$index]" finish-status="success" simple process-status="finish">
<el-step title="未协"/>
<el-step title="已协"/>
<el-step title="交检"/>
<el-step title="入库"/>
</el-steps>
{{ scope.row.扣款说明 }}
</template>
</el-table-column>
</el-table>
@@ -118,9 +194,6 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
span{
margin: 10px 0 10px 10px;
}

View File

@@ -1,85 +1,5 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<span>表单号:</span>
<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:200px;margin-bottom: 10px"/>
<span>外协厂家:</span>
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:200px" clearable/>
<span>下达任务日期:</span>
<el-date-picker
type="date"
size="small"
placeholder="选择日期"/>
</el-row>
<el-row>
<span>单据状态:</span>
<el-select v-model="documentStatus" filterable placeholder="请选择" size="small" clearable>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="pageSize=10;pageList=1;fetchData()">查询</el-button>
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">增加</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading2" :data="List" highlight-current-row height="350" size="mini" stripe border @row-click="searchProcess" >
<el-table-column label="单据状态" prop="单据状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.单据状态==='成交'" type="success" size="small">成交</el-tag>
<el-tag v-else type="info" size="small">未成交</el-tag>
</template>
</el-table-column>
<el-table-column label="表单号" prop="表单号" align="center" min-width="200px">
<template slot-scope="scope">
{{ scope.row.表单号 }}
</template>
</el-table-column>
<el-table-column label="外协厂家" prop="外协厂家" align="center" min-width="200px">
<template slot-scope="scope">
{{ scope.row.外协厂家 }}
</template>
</el-table-column>
<el-table-column label="任务下达日期" prop="任务下达日期" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务下达日期 }}
</template>
</el-table-column>
<el-table-column label="外协员" prop="外协计划员" align="center" >
<template slot-scope="scope">
{{ scope.row.外协计划员 }}
</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" min-width="200px">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" plain style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button :disabled="scope.row.单据状态==='成交'" plain type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-show="!loading2"
:current-page="currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<span>零件号:</span>
<el-input v-model="partNumber" size="small" placeholder="零件号" clearable style="width:200px"/>
@@ -92,24 +12,24 @@
size="mini"
stripe
highlight-current-row
height="450"
height="350"
tooltip-effect="dark"
style="width: 100%;margin-top: 20px"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"/>
<el-table-column label="项目名称" prop="项目名称" align="center" >
<el-table-column label="项目名称" prop="项目名称" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" prop="零件图号" align="center" width="120px" >
<el-table-column label="零件图号" prop="零件图号" align="center" width="200px" >
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" prop="零件名称" align="center" min-width="140px" >
<el-table-column label="零件名称" prop="零件名称" align="center" min-width="100px" >
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
@@ -144,212 +64,154 @@
{{ (scope.row.外协预算总价格).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" >
<el-table-column label="零件类型" align="center" width="">
<template slot-scope="scope">
{{ scope.row.是否临时件 }}
</template>
</el-table-column>
<el-table-column label="外协工序" align="center">
<el-table-column label="外协工序" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.外协工序 }}
</template>
</el-table-column>
</el-table>
<el-button type="info" size="mini" icon="el-icon-arrow-down" style="margin-left:10px;margin-top: 15px" @click="getSpareParts">选入零件</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="List3" :summary-method="getSummaries" :row-class-name="tableRowClassName" stripe size="mini" show-summary>
<el-table-column :index="indexMethod" label="序号" align="center" type="index" width="50px"/>
<el-table-column label="零件图号" align="center" width="200px">
<el-col :span="8">
<!--<span>表单号:</span>-->
<!--<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:200px;margin-bottom: 10px"/>-->
<span>厂家:</span>
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:160px" clearable @keyup.enter.native="pageSize=20;pageList=1;fetchData()" @clear="pageSize=20;pageList=1;fetchData()"/>
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="pageSize=20;pageList=1;fetchData()">查询</el-button>
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">新增</el-button>
<el-table v-loading="loading2" :data="List" highlight-current-row height="450" size="mini" stripe border @row-click="searchProcess" >
<el-table-column label="表单号" prop="表单号" align="center" min-width="155px">
<template slot-scope="scope">
{{ scope.row.表单号 }}
</template>
</el-table-column>
<el-table-column label="外协厂家" prop="外协厂家" align="center" min-width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.外协厂家 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100px">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit" plain style="margin-left:10px" @click="handleEdit(scope.row)"/>
<el-button :disabled="scope.row.单据状态==='成交'" plain type="text" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-show="!loading2"
:current-page="currentPage"
:page-sizes="[20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<!--<span>下达任务日期:</span>-->
<!--<el-date-picker-->
<!--type="date"-->
<!--size="small"-->
<!--placeholder="选择日期"/>-->
<!--<span>单据状态:</span>-->
<!--<el-select v-model="documentStatus" filterable placeholder="请选择" size="small" clearable>-->
<!--<el-option-->
<!--v-for="item in options"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value">-->
<!--<div style="float: left">{{ item.label }}</div>-->
<!--<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>-->
<!--</el-option>-->
<!--</el-select>-->
</el-col>
<el-col :span="16">
<div>
<!--<span>下调金额:百分比</span>-->
<!--<el-input v-model="money" size="small" clearable style="width: 90px"/>-->
<!--<el-tooltip :open-delay="1200" effect="dark" content="计算选入零件的价格" placement="top">-->
<!--<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="calculatingPrice">计算价格</el-button>-->
<!--</el-tooltip>-->
<el-button type="warning" size="mini" icon="el-icon-arrow-down" style="margin-left:10px" @click="getSpareParts">选入零件</el-button>
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;float: right" @click="exportTable('RWD')">导出单据</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="成交" placement="top">
<el-button type="success" size="mini" icon="el-icon-success" style="margin-left:10px;margin-top: 3px;float: right" @click="Deal">成交</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="核对价格信息后确定" placement="top">
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 3px;float: right" @click="confirmPrice">保存</el-button>
</el-tooltip>
</div>
<el-table v-loading="loading" :data="List3" :summary-method="getSummaries" :row-class-name="tableRowClassName" height="488" stripe size="mini" show-summary border>
<el-table-column label="零件图号" align="center" min-width="150px">
<template slot-scope="scope">
{{ 零件图号[scope.$index] }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="180px">
<el-table-column label="零件名称" align="center" min-width="120px">
<template slot-scope="scope">
{{ 零件名称[scope.$index] }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="100px">
<el-table-column label="数量" align="center" width="60px">
<template slot-scope="scope">
{{ 批次数量[scope.$index] }}
</template>
</el-table-column>
<!--<el-table-column label="零件工艺" align="center">-->
<!--<el-table-column label="[1]" align="center" width="100px">-->
<!--<el-table-column label="预算(加工)" align="center" width="130px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][0] }}-->
<!--{{ 外协预算总价格[scope.$index] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[2]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][1] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[3]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][2] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[4]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][3] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[5]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][4] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[6]" width="100px" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][5] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[7]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][6] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[8]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][7] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[9]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][8] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[10]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][9] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[11]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][10] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[12]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][11] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[13]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][12] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[14]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][13] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[15]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][14] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[16]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][15] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[17]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][16] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[18]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][17] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[19]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][18] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="[20]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][19] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table-column>-->
<el-table-column label="加工价格" align="center">
<el-table-column label="预算" align="center" width="130px">
<el-table-column label="外协价格" align="center" width="130px">
<template slot-scope="scope">
{{ 外协预算总价格[scope.$index] }}
<el-input v-model="加工价格_成交[scope.$index]" size="small" readonly/>
</template>
</el-table-column>
<el-table-column label="成交" align="center" width="130px">
<template slot-scope="scope">
<el-input v-model="加工价格_成交[scope.$index]" readonly/>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="材料价格" align="center">
<el-table-column label="类别" align="center" width="130px">
<template slot-scope="scope">
{{ 外协分类[scope.$index] }}
</template>
</el-table-column>
<el-table-column label="预算" align="center" width="130px">
<template slot-scope="scope">
{{ 材料费[scope.$index] }}
</template>
</el-table-column>
<el-table-column label="成交" align="center" width="130px">
<template slot-scope="scope">
<el-input v-model="材料价格_价格[scope.$index]"/>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="其他价格" align="center" width="120px">
<template slot-scope="scope">
<el-input v-model="其他价格[scope.$index]"/>
</template>
</el-table-column>
<el-table-column label="计划要求" align="center" width="100px">
<el-table-column label="开始" align="center" width="100px">
<!--<el-table-column label="材料类别" align="center" width="130px">-->
<!--<template slot-scope="scope">-->
<!--{{ 外协分类[scope.$index] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="预算(材料)" align="center" width="130px">-->
<!--<template slot-scope="scope">-->
<!--{{ 材料费[scope.$index] }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="成交(材料)" align="center" width="130px">-->
<!--<template slot-scope="scope">-->
<!--<el-input v-model="材料价格_价格[scope.$index]" size="small"/>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="其他价格" align="center" width="120px">-->
<!--<template slot-scope="scope">-->
<!--<el-input v-model="其他价格[scope.$index]" size="small"/>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="计划开始" align="center" width="100px">
<template slot-scope="scope">
{{ (机加工开始时间[scope.$index]) }}
</template>
</el-table-column>
<el-table-column label="结束" align="center" width="100px">
<el-table-column label="计划结束" align="center" width="100px">
<template slot-scope="scope">
{{ (机加工结束时间[scope.$index]) }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right">
<el-table-column label="操作" align="center" width="80px">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
plain
icon="el-icon-delete"
@click="handleDelete1(scope.$index)">移除</el-button>
<el-button size="mini" type="text" plain icon="el-icon-delete" @click="handleDelete1(scope.$index)">移除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<span>下调金额:百分比</span>
<el-input v-model="money" size="small" clearable style="width:200px"/>
<el-tooltip :open-delay="1200" effect="dark" content="计算选入零件的价格" placement="top">
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="calculatingPrice">计算价格</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="核对价格信息后确定" placement="top">
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="confirmPrice">确定价格</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="成交" placement="top">
<el-button type="success" size="mini" icon="el-icon-success" style="margin-left:10px;margin-top: 15px" @click="Deal">成交</el-button>
</el-tooltip>
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 15px" @click="exportTable('RWD')">导出外协加工任务单</el-button>
</div>
</el-col>
</el-card>
<el-card v-show="card">
<el-card v-if="card">
<div id="RWD">
<table cellspacing="0px" align="center" width="100%" style="">
<tbody id="1">
@@ -359,21 +221,21 @@
</tr>
<tr class="tbodyHead">
<td colspan="2">任务单号:</td>
<td colspan="6">{{ 任务单号 }}</td>
<td colspan="4">任务下达日期:</td>
<td colspan="4">{{ 任务下达日期 }}</td>
<td colspan="5">{{ 任务单号 }}</td>
<td colspan="5">下达日期:</td>
<td colspan="5">{{ 任务下达日期 }}</td>
<td colspan="3">外协厂家:</td>
<td colspan="9">{{ 外协厂家 }}</td>
<td colspan="8">{{ 外协厂家 }}</td>
</tr>
<tr class="tbodyHead">
<td colspan="2">外协员:</td>
<td colspan="6">{{ 外协员 }}</td>
<td colspan="2">电话:</td>
<td colspan="1">外协员:</td>
<td colspan="3">{{ 外协员 }}</td>
<td colspan="4">电话:</td>
<td colspan="6">{{ 外协员电话 }}</td>
<td colspan="3">联系人:</td>
<td colspan="3">{{ 联系人 }}</td>
<td colspan="2">电话:</td>
<td colspan="4">{{ 联系人电话 }}</td>
<td colspan="6">{{ 联系人电话 }}</td>
</tr>
<tr id="tableHead">
<td style="width: 2%">序号</td>
@@ -381,11 +243,11 @@
<td colspan="2" style="width: 4%">零件名称</td>
<td colspan="2" style="width: 2%">数量</td>
<td colspan="9" width="30%">内容</td>
<td colspan="1">零件类型</td>
<td>外协类别</td>
<td>加工价格</td>
<td>材料价格</td>
<td>其他价格</td>
<!--<td colspan="1">零件类型</td>-->
<!--<td>外协类别</td>-->
<td>外协价格</td>
<!--<td>材料价格</td>-->
<!--<td>其他价格</td>-->
<td colspan="2">计划开始</td>
<td colspan="2">计划结束</td>
</tr>
@@ -394,24 +256,16 @@
<tfoot>
<tr id="tableFoot">
<td>费用</td>
<td colspan="17" style="text-align: left;">加工费{{ 加工价格合计 }}材料费{{ 材料价格合计 }}其他费用{{ 其他价格合计 }}运费{{ 运费 }}合计{{ 总计 }}人民币大写{{ 大写金额 }}</td>
<td colspan="1">0</td>
<td colspan="1"/>
<td/>
<td>{{ 加工价格合计 }}</td>
<td>{{ 材料价格合计 }}</td>
<td>{{ 其他价格合计 }}</td>
<td colspan="2">{{ 最早时间 }}</td>
<td colspan="2">{{ 时间 }}</td>
</tr>
<tr class="foot">
<td colspan="4">外协员:</td>
<td colspan="4">外协科长:</td>
<td colspan="4">采购二部长:</td>
<td colspan="4">制品部长:</td>
<td colspan="4">定额科统计员:</td>
<td colspan="4">定额科长:</td>
<td colspan="4">外协厂:</td>
<td colspan="27" style="text-align: left;">加工费{{ 加工价格合计 }}人民币大写{{ 大写金额 }}</td>
<!--材料费{{ 材料价格合计 }}其他费用{{ 其他价格合计 }}运费{{ 运费 }}合计{{ 总计 }}-->
<!--<td colspan="1">0</td>-->
<!--<td colspan="1"/>-->
<!--<td/>-->
<!--<td>{{ 加工价格合计 }}</td>-->
<!--<td>{{ 材料价格合计 }}</td>-->
<!--<td>{{ 其他价格合计 }}</td>-->
<!--<td colspan="2">{{ 时间 }}</td>-->
<!--<td colspan="2">{{ 最晚时间 }}</td>-->
</tr>
</tfoot>
</table>
@@ -436,7 +290,7 @@
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="500px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="100px" class="demo-ruleForm">
<el-form-item label="表单号" prop="表单号" style="margin-left: 70px">
<el-input v-model="form.表单号" placeholder="表单号" size="small" style="width:70px" disabled/>
<el-input v-model="form.表单号" placeholder="表单号" size="small" style="width: 200px" disabled/>
</el-form-item>
<el-form-item label="下达任务日期" prop="下达任务日期" style="margin-left: 70px">
<el-date-picker
@@ -450,9 +304,16 @@
value-format="yyyy-MM-dd"/>
</el-form-item>
<el-form-item label="外协厂家" prop="外协厂家" style="margin-left: 70px">
<el-input v-model="form.外协厂家" readonly placeholder="外协厂家" size="small" style="width:200px" clearable>
<el-button slot="append" icon="el-icon-search" @click="onFocus1();param=1"/>
</el-input>
<el-select v-model="form.外协厂家" placeholder="选择外协厂家" filterable clearable size="small" style="width:200px">
<el-option
v-for="item in ManufacturerName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input v-model="form.外协厂家" readonly placeholder="外协厂家" size="small" style="width:200px" clearable>-->
<!--<el-button slot="append" icon="el-icon-search" @click="onFocus1();param=1"/>-->
<!--</el-input>-->
</el-form-item>
<el-form-item label="运费" prop="运费" style="margin-left: 70px">
<el-input v-model="form.运费" placeholder="运费" size="small" style="width:200px" clearable/>
@@ -467,7 +328,7 @@
</template>
<script>
import { getTable, getData1, getTable1, getprocedure, searchManufactor, spareParts, addTable, editData, deleteData, insertParts, getParts, getPrice, editData1, deleteData1, getNumber } from '@/api/Outsourcing/OutsourcingTaskExecution'
import { initOutHelp, getTable, getData1, getTable1, getprocedure, searchManufactor, spareParts, addTable, editData, deleteData, insertParts, getParts, getPrice, editData1, deleteData1, getNumber } from '@/api/Outsourcing/OutsourcingTaskExecution'
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex'
@@ -540,6 +401,7 @@ export default {
外协厂家: '',
运费: null
},
ManufacturerName: [], // 厂家名称
rules: {
外协厂家: [{ required: true, message: '请选择外协厂家', trigger: 'change' }],
运费: [{ required: true, message: '请输入运费', trigger: 'blur' }]
@@ -573,7 +435,7 @@ export default {
机加工结束时间: [],
外协加工任务单明细流水号: [],
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageSize: 20, // 每页显示条数
pageList: 1, // 后台获取页
currentPage: 1, // 显示当前页
options: [{
@@ -614,6 +476,15 @@ export default {
}
},
fetchData() {
this.ManufacturerName = []
initOutHelp().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ManufacturerName.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
}
})
this.loading2 = true
var day3 = new Date(this.time)
var day4 = new Date(this.time)
@@ -735,7 +606,7 @@ export default {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td></td>' + '<td colspan="5"></td>' + '<td colspan="2"></td>' + '<td colspan="2"></td>' +
'<td colspan="9" style="text-align: left;"></td>' + '<td colspan="1"></td>' + '<td></td><td></td><td></td><td></td><td colspan="2"></td><td colspan="2"></td>'
'<td colspan="9" style="text-align: left;"></td>' + '<td colspan="1"></td>' + '<td colspan="2"></td><td colspan="2"></td>'
$('#tableHead').after(tr[i])
}
for (let j = 0; j < this.returns.length; j++) {
@@ -744,20 +615,20 @@ export default {
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].零件名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].批次数量
document.getElementsByClassName('tableData')[j].children[4].innerHTML = ''
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].是否临时件1
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].外协分类
document.getElementsByClassName('tableData')[j].children[7].innerHTML = parseInt(response.data[j].加工价格_成交.toFixed(2))
document.getElementsByClassName('tableData')[j].children[8].innerHTML = parseInt(response.data[j].材料价格_价格.toFixed(2))
document.getElementsByClassName('tableData')[j].children[9].innerHTML = parseInt(response.data[j].其他价格.toFixed(2))
// document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].是否临时件1
// document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].外协分类
document.getElementsByClassName('tableData')[j].children[5].innerHTML = parseInt(response.data[j].加工价格_成交.toFixed(2))
// document.getElementsByClassName('tableData')[j].children[8].innerHTML = parseInt(response.data[j].材料价格_价格.toFixed(2))
// document.getElementsByClassName('tableData')[j].children[9].innerHTML = parseInt(response.data[j].其他价格.toFixed(2))
if (response.data[j].机加工开始时间 !== null) {
document.getElementsByClassName('tableData')[j].children[10].innerHTML = response.data[j].机加工开始时间.substr(0, 10)
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].机加工开始时间.substr(0, 10)
}
if (response.data[j].机加工结束时间 !== null) {
document.getElementsByClassName('tableData')[j].children[11].innerHTML = response.data[j].机加工结束时间.substr(0, 10)
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].机加工结束时间.substr(0, 10)
}
this.加工价格合计 += parseInt(document.getElementsByClassName('tableData')[j].children[7].innerHTML)
this.材料价格合计 += parseInt(document.getElementsByClassName('tableData')[j].children[8].innerHTML)
this.其他价格合计 += parseInt(document.getElementsByClassName('tableData')[j].children[9].innerHTML)
this.加工价格合计 += parseInt(document.getElementsByClassName('tableData')[j].children[5].innerHTML)
// this.材料价格合计 += parseInt(document.getElementsByClassName('tableData')[j].children[8].innerHTML)
// this.其他价格合计 += parseInt(document.getElementsByClassName('tableData')[j].children[9].innerHTML)
}
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
this.大写金额 = convertCurrency(this.总计)
@@ -836,7 +707,7 @@ export default {
getNumber(this.form.下达任务日期).then(response => {
this.form.表单号 = response.data.result[0].Column1
})
this.form.运费 = null
this.form.运费 = 0
this.form.外协厂家 = ''
this.dialogFormVisible = true
},
@@ -846,7 +717,7 @@ export default {
this.form.运费 = ''
this.$message.error('请输入数字')
} else {
addTable(this.form.表单号, this.id, this.ManufactorNumber1, this.form.下达任务日期, this.form.运费).then(response => {
addTable(this.form.表单号, this.id, this.form.外协厂家, this.form.下达任务日期, this.form.运费).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
@@ -927,57 +798,60 @@ export default {
},
getSummaries(param) {
const { data } = param
const sums = ['', '', '', 0, '', 0, '', 0, '', 0, '', 0, '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, '', 0, 0, 0, '', '']
sums[1] = '费用'
sums[2] = '加工费:'
sums[4] = '材料费:'
sums[6] = '其他费用:'
sums[8] = '运费:'
sums[9] = parseInt(this.freight)
sums[10] = '合计:'
const sums = ['', '', 0, 0, '', '']
sums[0] = '合计'
// sums[2] = '加工费:'
// sums[4] = '材料费:'
// sums[6] = '其他费用:'
// sums[8] = '运费:'
// sums[9] = parseInt(this.freight)
// sums[10] = '合计:'
// for (let i = 0; i < data.length; i++) {
// sums[24] += Math.round(parseFloat(data[i].外协预算总价格) * 100) / 100
// }
// sums[24] = Math.round(sums[24] * 100) / 100
for (let i = 0; i < data.length; i++) {
sums[24] += Math.round(parseFloat(data[i].外协预算总价格) * 100) / 100
}
sums[24] = Math.round(sums[24] * 100) / 100
for (let i = 0; i < data.length; i++) {
sums[25] += Math.round(parseFloat(data[i].加工价格_成交) * 100) / 100
}
sums[25] = Math.round(sums[25] * 100) / 100
for (let i = 0; i < data.length; i++) {
sums[27] += Math.round(parseFloat(data[i].材料费) * 100) / 100
}
sums[27] = Math.round(sums[27] * 100) / 100
for (let i = 0; i < data.length; i++) {
sums[28] += Math.round(parseFloat(data[i].材料价格_价格) * 100) / 100
}
sums[28] = Math.round(sums[28] * 100) / 100
for (let i = 0; i < data.length; i++) {
sums[29] += Math.round(parseFloat(data[i].其他价格) * 100) / 100
}
sums[29] = Math.round(sums[29] * 100) / 100
for (let i = 0; i < data.length; i++) {
if (data[i].机加工开始时间 !== null) {
if (Date.parse(data[i].机加工开始时间) <= this.contrast) {
this.contrast = Date.parse(data[i].机加工开始时间)
sums[30] = data[i].机加工开始时间.substr(0, 10)
this.最早时间 = data[i].机加工开始时间.substr(0, 10)
}
}
sums[2] += parseInt(data[i].批次数量)
}
for (let i = 0; i < data.length; i++) {
if (data[i].加工结束时间 !== null) {
if (Date.parse(data[i].机加工结束时间) >= this.contrast1) {
this.contrast1 = Date.parse(data[i].机加工结束时间)
sums[31] = data[i].机加工结束时间.substr(0, 10)
this.最晚时间 = data[i].机加工结束时间.substr(0, 10)
sums[3] += Math.round(parseFloat(data[i].加工价格_成交) * 100) / 100
}
}
}
sums[3] = sums[25]
sums[5] = sums[28]
sums[7] = sums[29]
sums[11] = Math.round((sums[3] + sums[5] + sums[7] + sums[9]) * 100) / 100
sums[26] = '---'
sums[3] = Math.round(sums[3] * 100) / 100 + ' 元'
// for (let i = 0; i < data.length; i++) {
// sums[27] += Math.round(parseFloat(data[i].材料费) * 100) / 100
// }
// sums[27] = Math.round(sums[27] * 100) / 100
// for (let i = 0; i < data.length; i++) {
// sums[28] += Math.round(parseFloat(data[i].材料价格_价格) * 100) / 100
// }
// sums[28] = Math.round(sums[28] * 100) / 100
// for (let i = 0; i < data.length; i++) {
// sums[29] += Math.round(parseFloat(data[i].其他价格) * 100) / 100
// }
// sums[29] = Math.round(sums[29] * 100) / 100
// for (let i = 0; i < data.length; i++) {
// if (data[i].机加工开始时间 !== null) {
// if (Date.parse(data[i].机加工开始时间) <= this.contrast) {
// this.contrast = Date.parse(data[i].机加工开始时间)
// sums[30] = data[i].机加工开始时间.substr(0, 10)
// this.最早时间 = data[i].机加工开始时间.substr(0, 10)
// }
// }
// }
// for (let i = 0; i < data.length; i++) {
// if (data[i].机加工结束时间 !== null) {
// if (Date.parse(data[i].机加工结束时间) >= this.contrast1) {
// this.contrast1 = Date.parse(data[i].机加工结束时间)
// sums[31] = data[i].机加工结束时间.substr(0, 10)
// this.最晚时间 = data[i].机加工结束时间.substr(0, 10)
// }
// }
// }
// sums[3] = sums[25]
// sums[5] = sums[28]
// sums[7] = sums[29]
// sums[11] = Math.round((sums[3] + sums[5] + sums[7] + sums[9]) * 100) / 100
// sums[26] = '---'
return sums
},
// 计算价格
@@ -1289,7 +1163,7 @@ export default {
},
// 提交编辑
submitEdit() {
editData(this.Number, this.ManufactorNumber1, this.form.运费, this.Explain).then(response => {
editData(this.Number, this.form.外协厂家, this.form.运费, this.Explain).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible = false

View File

@@ -1,31 +1,21 @@
<template>
<div class="app-container">
<el-col :span="10">
<el-card>
<span>表单号:</span>
<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:150px"/>
<span>外协厂家:</span>
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:150px" clearable/>
<span>下达任务日期:</span>
<el-date-picker
v-model="time"
type="date"
size="small"
placeholder="选择日期"/>
<!--<span>表单号:</span>-->
<!--<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:150px"/>-->
<span>厂家:</span>
<el-input v-model="manufacturers" size="small" placeholder="厂家" style="width:160px" clearable @keyup.enter.native="pageSize=10;pageList=1;fetchData()"/>
<!--<span>下达任务日期:</span>-->
<!--<el-date-picker-->
<!--v-model="time"-->
<!--type="date"-->
<!--size="small"-->
<!--placeholder="选择日期"/>-->
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="pageSize=10;pageList=1;fetchData()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="打印外协采购单" placement="top">
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" @click="exportTable('RWD')">导出外协加工任务单</el-button>
</el-tooltip>
</el-card>
<el-card>
<el-table v-loading="loading2" :data="List" highlight-current-row stripe size="mini" height="350" border @row-click="searchProcess" >
<el-table-column label="付款状态" prop="实际付款时间" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small" style="margin: 0px">已付款</el-tag>
<el-tag v-else type="info" size="small" style="margin: 0px">未付款</el-tag>
</template>
</el-table-column>
<el-table v-loading="loading2" :data="List" highlight-current-row stripe size="mini" height="550" border @row-click="searchProcess" >
<el-table-column label="表单号" prop="表单号" align="center" min-width="200px">
<template slot-scope="scope">
{{ scope.row.表单号 }}
@@ -36,21 +26,6 @@
{{ scope.row.外协厂家 }}
</template>
</el-table-column>
<el-table-column label="任务下达日期" prop="任务下达日期" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务下达日期 }}
</template>
</el-table-column>
<el-table-column label="外协员" prop="外协计划员" align="center" >
<template slot-scope="scope">
{{ scope.row.外协计划员 }}
</template>
</el-table-column>
<el-table-column label="运费" align="center" >
<template slot-scope="scope">
{{ scope.row.运费 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
@@ -64,19 +39,14 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
</el-col>
<el-col :span="14">
<el-card>
<el-table
ref="multipleTable"
:data="List3"
border
stripe
size="mini"
highlight-current-row
height="450"
tooltip-effect="dark"
style="width: 100%;margin-top: 20px"
@selection-change="handleSelectionChange">
<el-button type="warning" size="mini" icon="el-icon-arrow-down" style="margin-left:10px" @click="getSpareParts">收货</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="打印外协采购单" placement="top">
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;float: right" @click="exportTable('RWD')">导出单据</el-button>
</el-tooltip>
<el-table ref="multipleTable" :data="List3" border stripe size="mini" highlight-current-row height="595" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column
:selectable="selectable"
type="selection"
@@ -109,10 +79,9 @@
</template>
</el-table-column>
</el-table>
<el-button type="info" size="mini" icon="el-icon-arrow-down" style="margin-left:10px;margin-top: 15px" @click="getSpareParts">收货</el-button>
</el-card>
<el-card>
</el-col>
<el-card v-if="false">
<div id="RWD">
<table cellspacing="0px" align="center" width="100%" style="">
<tbody id="1">
@@ -635,7 +604,6 @@ export default {
getSpareParts() { // 选入零件
if (this.OutsouringNumber.length !== 0) {
Arrival(this.OutsouringNumber).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('到货成功')
this.contrast = 3000000000000

View File

@@ -68,7 +68,8 @@
</el-col>
<el-col :span="14">
<el-card>
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableData1ClassName" height="635" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-button size="small" type="primary" style="margin: 10px" @click="saveRowPrice()">保存</el-button>
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableData1ClassName" height="580" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-table-column label="序号" type="index" align="center" width="50"/>
<el-table-column label="加工状态" width="100" align="center">
<template slot-scope="scope">
@@ -111,7 +112,7 @@
</template>
<script>
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2, saveRowPrice } from '@/api/Outsourcing/PreorderAssociation'
export default {
data() {
return {
@@ -324,6 +325,23 @@ export default {
})
}
},
// 保存行价格
saveRowPrice() {
if (this.tableData2.length === 0) {
this.$message.error('请选择零件')
} else {
this.a = 0
for (let i = 0; i < this.tableData2.length; i++) {
saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData2.length) {
this.$message.success('保存成功')
this.searchTable()
}
})
}
}
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val