制造部采购

This commit is contained in:
bryan sun
2019-11-28 15:47:21 +08:00
21 changed files with 1028 additions and 961 deletions

View File

@@ -188,6 +188,9 @@
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="领料部门" label-width="100px" size="small">
<el-input v-model="form3.department" size="small" placeholder="领料部门" style="width: 200px"/>
</el-form-item>
<el-form-item label="人员编号" prop="password" label-width="100px" size="small">
<el-input v-model="form3.password" size="small" placeholder="人员编号" style="width: 200px"/>
</el-form-item>
@@ -272,6 +275,7 @@ export default {
},
form3: {
outTypeValue: '',
department: '',
password: ''
},
form4: {
@@ -434,6 +438,7 @@ export default {
inputPassword() {
this.form3.outTypeValue = ''
this.form3.password = ''
this.form3.department = ''
this.dialogFormVisible3 = true
},
selectable(row, index) { // 控制某行是否可选
@@ -559,7 +564,7 @@ export default {
this.outNumber.push(this.pickListTable2[i].出库数量)
}
}
submitOutStore(this.multipleSelection, this.basePartNum, this.materialNum, this.parchasePartNum, this.purchaseBillNum, this.groupNumValue, this.machineValue, this.outNumber, this.id, this.form3.password, this.form3.outTypeValue, this.pickingListNum, this.offlineNum).then(response => {
submitOutStore(this.multipleSelection, this.basePartNum, this.materialNum, this.parchasePartNum, this.purchaseBillNum, this.groupNumValue, this.machineValue, this.outNumber, this.id, this.form3.password, this.form3.outTypeValue, this.pickingListNum, this.offlineNum, this.form3.department).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.dialogFormVisible3 = false

View File

@@ -9,7 +9,7 @@
</el-row>
<span>物料型号</span>
<el-input v-model="materialModel" placeholder="物料型号" clearable size="small"/>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
</el-card>
<el-card>
@@ -113,7 +113,12 @@
{{ scope.row.出库人姓名 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="140">
<el-table-column label="领料部门" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.领料部门 }}
</template>
</el-table-column>
<el-table-column label="领料人" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
@@ -152,15 +157,6 @@
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="分组" prop="GroupNumValue" label-width="100px">
<el-select v-model="form.GroupNumValue" filterable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
<el-option
v-for="item in GroupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="出库数量" prop="DirectNumber" label-width="100px" size="small">
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
@@ -173,6 +169,9 @@
<!--:value="item.value"/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="领料部门" prop="DirectNumber" label-width="100px" size="small">
<el-input v-model="form.department" size="small" placeholder="领料部门" style="width: 200px"/>
</el-form-item>
<el-form-item label="领料人" prop="DirectNote" label-width="100px">
<el-input v-model="form.DirectNote" size="small" placeholder="请输入领料人" style="width: 200px"/>
</el-form-item>
@@ -208,6 +207,7 @@ export default {
ProjectValue: '',
MachineValue: '',
GroupNumValue: '',
department: '',
DirectNumber: '',
PeopleValue: '',
DirectNote: ''
@@ -230,7 +230,7 @@ export default {
listLoading1: '',
partnumber: '',
pageCurrent1: 1,
pageSize1: 10,
pageSize1: 20,
total1: 0,
pageCurrent2: 1,
pageSize2: 10,
@@ -377,7 +377,7 @@ export default {
} else {
this.$refs['form'].validate((valid) => {
if (valid) {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号, this.组件零件基本件流水号).then(response => {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号, this.组件零件基本件流水号, this.form.department).then(response => {
if (response.data[0].result === '1') {
this.$message.success('零件出库成功')
this.dialogFormVisible = false

View File

@@ -529,7 +529,8 @@ import {
TableAddLi,
getPartnames3,
getPartnames4,
modifyRemark
modifyRemark,
detailInfo
} from '@/api/ManufacturingCenter/ProcessPlanningNew'
import elInput from 'element-ui/packages/input'
import { mapGetters } from 'vuex'
@@ -1192,6 +1193,21 @@ export default {
searchDetail() {
if (this.partNumValue !== '' && this.partNumValue !== null) {
this.loading0 = true
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.material = response.data[0].材料流水号
this.materialName = response.data[0].材料
this.spec = response.data[0].原材料规格
if (response.data[0].重量 === null) {
this.weight = ''
} else {
this.weight = response.data[0].重量
}
}
})
mainTable(this.partNumValue).then(response => {
this.tableData = []
for (let i = 0; i < response.data.length; i++) {

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,57 +50,62 @@
: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-column
label="序号"
type="index"
align="center"
fixed="left"
width="50"/>
<el-table-column label="付款状态" prop="实际付款时间" width="100" align="center" fixed="left">
<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="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="100px">
<template slot-scope="scope">
{{ parseFloat(scope.row.总价).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="扣款金额" align="center" min-width="100px">
<template slot-scope="scope">
{{ parseFloat(scope.row.扣款_质量).toFixed(2) }}
</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="100px">
<template slot-scope="scope">
{{ parseFloat(scope.row.应付总额).toFixed(2) }}
</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="任务下达日期" prop="任务下达日期" align="center" min-width="125px">
<template slot-scope="scope">
{{ scope.row.任务下达日期 }}
@@ -94,109 +116,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">
<!--<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" width="200px" fixed="right">
<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" min-width="120px">
<template slot-scope="scope">
{{ scope.row.扣款说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="280px" 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.实际付款时间!==''"
size="mini"
type="primary"
plain
class="el-icon-edit"
@click="Withdrawing(scope.$index, scope.row, 'form2')">扣款</el-button>
<el-button :disabled="scope.row.实际付款时间!==''" size="mini" type="primary" plain class="el-icon-edit" @click="Withdrawing(scope.$index, scope.row, 'form2')">扣款</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="付款信息" placement="top">
<el-button
:disabled="scope.row.实际付款时间!==''||scope.row.单据状态!=='3'"
size="mini"
type="success"
class="el-icon-check"
@click="payment(scope.$index, scope.row)">付款</el-button>
<el-button :disabled="scope.row.实际付款时间!==''||scope.row.单据状态!=='3'" size="mini" type="success" class="el-icon-check" @click="payment(scope.$index, scope.row)">付款</el-button>
</el-tooltip>
</template>
</el-table-column>
@@ -205,7 +183,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"
@@ -215,35 +193,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">
<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="200px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column label="接收人" prop="接收人" align="center" width="180px">
<!--<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="130px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.接收人 }}
{{ parseFloat(scope.row.开票金额).toFixed(2) }}
</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" width="150px" prop="开票金额">
<el-table-column label="接收日期" align="center" width="100px">
<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">
<template slot-scope="scope">
{{ scope.row.接收时间 }}
{{ scope.row.接收时间 === '1900/1/1' ? '-' : scope.row.接收时间 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
@@ -251,22 +248,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>
@@ -274,7 +259,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"
@@ -283,20 +268,20 @@
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" title="扣款" center style="min-height: 300px" width="800px">
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" title="扣款" center style="min-height: 300px" width="500px">
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="质量" style="margin-left: 200px">
<el-input v-model="form2.质量" placeholder="质量" size="small" style="width:200px"/>
<el-form-item label="扣款金额" prop="质量" style="margin-left: 70px">
<el-input v-model="form2.质量" placeholder="扣款金额" size="small" style="width:200px"/>
</el-form-item>
<el-form-item label="计划" style="margin-left: 200px">
<el-input v-model="form2.计划" placeholder="计划" size="small" style="width:200px"/>
</el-form-item>
<el-form-item label="其他" style="margin-left: 200px">
<el-input v-model="form2.其他" placeholder="其他" size="small" style="width:200px"/>
</el-form-item>
<el-form-item label="扣款说明" prop="扣款说明" style="margin-left: 200px">
<el-form-item label="扣款说明" prop="扣款说明" style="margin-left: 70px">
<el-input v-model="form2.扣款说明" placeholder="扣款说明" size="small" style="width:200px"/>
</el-form-item>
<!--<el-form-item label="计划" style="margin-left: 200px">-->
<!--<el-input v-model="form2.计划" placeholder="计划" size="small" style="width:200px"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="其他" style="margin-left: 200px">-->
<!--<el-input v-model="form2.其他" placeholder="其他" size="small" style="width:200px"/>-->
<!--</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2('form2')">取消</el-button>
@@ -306,6 +291,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="发票号" >
@@ -386,6 +384,7 @@ export default {
count1: 0,
count2: 0,
form: {
外协厂家: '',
发票号: '',
开户行: '',
开票时间: '',
@@ -394,6 +393,7 @@ export default {
接收时间: '',
备注: ''
},
外协厂家: [],
实际付款时间: '',
loading: false,
loading2: false,
@@ -406,8 +406,10 @@ export default {
扣款说明: ''
},
rules: {
外协厂家: [{ required: true, message: '请选择外协厂家', trigger: 'change' }],
发票号: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
开票金额: [{ required: true, message: '请输入开票金额', trigger: 'blur' }],
质量: [{ required: true, message: '请输入扣款金额', trigger: 'blur' }],
扣款说明: [{ required: true, message: '请输入扣款说明', trigger: 'blur' }]
},
date1: '',
@@ -417,59 +419,58 @@ 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) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总金额'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ' 元'
} else {
sums[index] = ''
}
})
const { data } = param
const sums = ['', '', 0, '', '', '', '']
sums[0] = '合计'
for (let i = 0; i < data.length; i++) {
sums[2] += parseInt(data[i].开票金额)
}
// sums[2] = Math.round(sums[2] * 100) / 100 + ' 元'
sums[2] = parseFloat(sums[2]).toFixed(2) + ' 元'
return sums
},
// 初始化外协厂家
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].外协厂家流水号
})
}
})
},
@@ -497,7 +498,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(' '))
@@ -579,15 +579,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) {
this.loading2 = false
} else {
let check
this.ManufacturerNameValue2 ? check = 1 : check = 0
getParts(check, this.ManufacturerNameValue2, this.pageCurrent2, this.pageSize2).then(response => {
this.loading2 = false
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(' '))
@@ -595,8 +594,6 @@ export default {
this.tableData2 = response.data.rows
this.total2 = response.data.total
}
}).then(() => {
this.loading2 = false
})
},
getParts2() {
@@ -614,13 +611,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.开票时间 = ''
@@ -628,18 +625,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('信息增加失败')
}
@@ -652,6 +650,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.开票时间
@@ -672,7 +677,7 @@ export default {
message: '信息修改成功',
type: 'success'
})
this.getParts2()
this.getParts()
} else {
this.$message.error('信息修改失败')
}
@@ -715,7 +720,7 @@ export default {
message: '信息删除成功',
type: 'success'
})
this.getParts2()
this.getParts()
} else {
this.$message.error('信息删除失败')
}
@@ -740,12 +745,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,77 @@
<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">-->
<!--<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">
<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-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" min-width="120px">
<template slot-scope="scope">
{{ scope.row.扣款说明 }}
</template>
</el-table-column>
</el-table>
@@ -118,9 +145,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,264 +12,205 @@
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" min-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>
</el-table-column>
<el-table-column label="数量" align="center" width="65px" >
<el-table-column label="数量" align="center" width="100px" >
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料费" align="center" width="65px" >
<template slot-scope="scope">
{{ scope.row.材料费 }}
</template>
</el-table-column>
<el-table-column label="分类" align="center" width="65px" >
<template slot-scope="scope">
{{ scope.row.外协分类 }}
</template>
</el-table-column>
<el-table-column label="投产" align="center" width="65px" >
<template slot-scope="scope">
{{ scope.row.传递时间_短 }}
</template>
</el-table-column>
<el-table-column label="计划结束" align="center" >
<template slot-scope="scope">
{{ scope.row.计划结束时间_短 }}
</template>
</el-table-column>
<el-table-column label="预算" align="center" >
<template slot-scope="scope">
{{ (scope.row.外协预算总价格).toFixed(2) }}
</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">
<!--<el-table-column label="材料费" align="center" width="65px" >-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.材料费 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="分类" align="center" width="65px" >-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.外协分类 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="投产" align="center" width="65px" >-->
<!--<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" >-->
<!--<template slot-scope="scope">-->
<!--{{ (scope.row.外协预算总价格).toFixed(2) }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="零件类型" align="center" width="">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.是否临时件 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="外协工序" align="center" show-overflow-tooltip min-width="150px">
<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">
<template slot-scope="scope">
{{ 零件图号[scope.$index] }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="180px">
<template slot-scope="scope">
{{ 零件名称[scope.$index] }}
</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">-->
<!--<el-table-column label="[1]" align="center" width="100px">-->
<!--<template slot-scope="scope">-->
<!--{{ process[scope.$index][0] }}-->
<!--</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-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.$index] }}
{{ scope.row.表单号 }}
</template>
</el-table-column>
<el-table-column label="成交" align="center" width="130px">
<el-table-column label="外协厂家" prop="外协厂家" align="center" min-width="140px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="加工价格_成交[scope.$index]" readonly/>
{{ scope.row.外协厂家 }}
</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" min-width="100px">
<template slot-scope="scope">
{{ 外协分类[scope.$index] }}
<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-column label="预算" align="center" width="130px">
</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] }}
{{ 零件图号[scope.$index] }}
</template>
</el-table-column>
<el-table-column label="成交" align="center" width="130px">
<el-table-column label="零件名称" align="center" min-width="120px">
<template slot-scope="scope">
<el-input v-model="材料价格_价格[scope.$index]"/>
{{ 零件名称[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="60px">
<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="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">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
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-table-column label="操作" align="center" width="80px">
<template slot-scope="scope">
<el-button size="mini" type="text" plain icon="el-icon-delete" @click="handleDelete1(scope.$index)">移除</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-card>
<el-card v-show="card">
<el-card v-show="true">
<div id="RWD">
<table cellspacing="0px" align="center" width="100%" style="">
<tbody id="1">
@@ -359,21 +220,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 +242,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 +255,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 +289,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 +303,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 +327,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 +400,7 @@ export default {
外协厂家: '',
运费: null
},
ManufacturerName: [], // 厂家名称
rules: {
外协厂家: [{ required: true, message: '请选择外协厂家', trigger: 'change' }],
运费: [{ required: true, message: '请输入运费', trigger: 'blur' }]
@@ -573,7 +434,7 @@ export default {
机加工结束时间: [],
外协加工任务单明细流水号: [],
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageSize: 20, // 每页显示条数
pageList: 1, // 后台获取页
currentPage: 1, // 显示当前页
options: [{
@@ -614,6 +475,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,29 +605,30 @@ 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++) {
console.log(document.getElementsByClassName('tableData')[j].children)
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].零件图号
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,118 +1,87 @@
<template>
<div class="app-container">
<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="选择日期"/>
<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-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>
<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>
<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-table-column
:selectable="selectable"
type="selection"
align="center"
width="55"/>
<el-table-column label="收货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.到货状态===1" 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-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.零件名称 }}
</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">
<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-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: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-card>
<el-card>
<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.表单号 }}
</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>
<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-col>
<el-col :span="14">
<el-card>
<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"
align="center"
width="55"/>
<el-table-column label="收货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.到货状态===1" 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-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.零件名称 }}
</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">
<template slot-scope="scope">
{{ scope.row.外协工序 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-card v-show="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

View File

@@ -40,33 +40,33 @@
</el-row>
</el-card>
<el-card>
<el-table v-show="contractNumType===1" :data="tableData5" border style="width: 100%" height="100px" size="mini">
<el-table-column label="组件名称" align="center" width="150">
<el-table v-show="contractNumType===1" :data="tableData5" border style="width: 1200px" height="100px" size="mini">
<el-table-column label="组件名称" align="center" width="180">
<template slot-scope="scope">
{{ scope.row.组件名称 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="100">
<el-table-column label="组号" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="120">
<el-table-column label="数量" align="center" width="90">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" size="mini" style="width:100%" @change="update1(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="单价" align="center" width="10">
<el-table-column label="单价" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini" style="width:100%" @change="update1(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="金额" align="center" width="150">
<template slot-scope="scope">
{{ parseInt(scope.row.数量) * parseFloat(scope.row.单价) }}
{{ (parseInt(scope.row.数量) * parseFloat(scope.row.单价)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="交货期" align="center" width="150">
<el-table-column label="交货期" align="center" width="160">
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.物料计划到货时间"
@@ -78,7 +78,7 @@
@change="update1(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="250">
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" style="width:100%" @change="update1(scope.row)"/>
</template>
@@ -460,6 +460,16 @@ export default {
if (response.data[0].result === '1') {
this.contractNumType = 1
this.dialogVisible2 = false
this.contractNum = []
initPurchaseOrder().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].请购单编号,
value: response.data[i].请购单流水号,
id: response.data[i].请购类型
})
}
})
this.searchData()
this.$message.success('转换成功')
} else {
@@ -483,6 +493,7 @@ export default {
},
searchData() {
this.contractSum = 0.00
this.contractSum2 = 0.00
for (let i = 0; i < this.contractNum.length; i++) {
if (this.contractNum[i].value === this.contractNumValue) {
this.contractNumType = this.contractNum[i].id
@@ -503,6 +514,7 @@ export default {
this.form3.机床 = response.data[0].机床图号
this.form3.groupNumValue = response.data[0].组件流水号
console.log(this.machineValue, 111)
this.groupNum = []
initGroupNum(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNum.push({
@@ -524,24 +536,44 @@ export default {
})
},
calculateContractSum() { // 计算合同总额
this.contractSum = 0
this.contractSum1 = 0
this.costAccount = 0
this.riseFallPoint = 0
this.tableData4 = []
for (let i = 0; i < this.groupNum2.length; i++) {
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
this.contractSum1 += parseFloat(this.groupNum2[i].金额)
this.tableData4.push(this.groupNum2[i])
}
this.contractSum = (this.contractSum1).toFixed(2)
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
this.costAccount = this.contractSum
if (parseInt(this.costAccount) === 0) {
this.$message.error('成本核算不可为0')
} else {
this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount
this.riseFallPoint = this.riseFallPoint.toFixed(2)
if (this.contractNumType === 0) {
this.contractSum = 0
this.contractSum1 = 0
this.costAccount = 0
this.riseFallPoint = 0
this.tableData4 = []
for (let i = 0; i < this.groupNum2.length; i++) {
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
this.contractSum1 += parseFloat(this.groupNum2[i].金额)
this.tableData4.push(this.groupNum2[i])
}
this.contractSum = (this.contractSum1).toFixed(2)
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
this.costAccount = this.contractSum
if (parseInt(this.costAccount) === 0) {
this.$message.error('成本核算不可为0')
} else {
this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount
this.riseFallPoint = this.riseFallPoint.toFixed(2)
}
} else if (this.contractNumType === 1) {
this.contractSum = 0
this.contractSum1 = 0
this.costAccount = 0
this.riseFallPoint = 0
for (let i = 0; i < this.groupNum5.length; i++) {
this.contractSum1 += parseFloat((parseInt(this.groupNum5[i].数量) * parseFloat(this.groupNum5[i].单价)).toFixed(2))
}
console.log(this.contractSum1, this.groupNum5, 898989)
this.contractSum = (this.contractSum1).toFixed(2)
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
this.costAccount = this.contractSum
if (parseInt(this.costAccount) === 0) {
this.$message.error('成本核算不可为0')
} else {
this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount
this.riseFallPoint = this.riseFallPoint.toFixed(2)
}
}
},
fetchData() {

View File

@@ -316,6 +316,13 @@
<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-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>
@@ -323,12 +330,12 @@
<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.采购单号 : scope.row.离线采购计划编号 }}
</template>
</el-table-column>
<el-table-column label="采购计划单名称" align="center">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
{{ scope.row.采购单名称 ? scope.row.采购单名称 : scope.row.离线采购计划名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" show-overflow-tooltip>
@@ -336,19 +343,19 @@
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center">
<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.下单日期.split(' ')[0] }}
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column label="计划完成日期" align="center">
<el-table-column v-show="planType===0" label="计划完成日期" align="center">
<template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }}
{{ scope.row.计划完成日期 ? scope.row.计划完成日期.split(' ')[0] : '-' }}
</template>
</el-table-column>
</el-table>
@@ -402,7 +409,7 @@
</el-table-column>
<el-table-column label="单位" align="center" width="60px">
<template slot-scope="scope">
{{ scope.row.单位 }}
{{ scope.row.单位 ? scope.row.单位 : '-' }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
@@ -419,7 +426,8 @@
</template>
<script>
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, searchTable5, searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6 } from '@/api/WorkshopProcurement/NewArrivalList.js'
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, saveWeight1, searchTable5,
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js'
import { mapGetters } from 'vuex'
export default {
@@ -432,6 +440,17 @@ export default {
ArrivalOrderNumber: '',
ArrivalOrderMXNumber: '',
supplierName0: '',
planType: 0,
planTypes: [
{
value: 0,
label: '采购计划'
},
{
value: 1,
label: '离线采购计划'
}
],
arrest: [],
check: 0,
Name: '',
@@ -456,6 +475,7 @@ export default {
tableData3: [],
tableData6: [],
采购计划流水号: '',
离线采购计划流水号: '',
tableData4: [],
total4: 0,
pageCurrent4: 1,
@@ -497,7 +517,8 @@ export default {
},
本次到货数量组: [],
工艺计划流水号组: [],
采购计划明细流水号组: []
采购计划明细流水号组: [],
离线采购计划明细流水号组: []
}
},
computed: {
@@ -505,6 +526,7 @@ export default {
'sidebar',
'avatar',
'name',
'userId',
'id' // 人员编号
])
},
@@ -525,13 +547,23 @@ export default {
})
},
searchTable2() { // 查询采购单列表
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
this.partNumber ? this.check5 = 1 : this.check5 = 0
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
if (this.planType === 0) {
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
this.partNumber ? this.check5 = 1 : this.check5 = 0
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
} else {
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
this.partNumber ? this.check5 = 1 : this.check5 = 0
searchLxPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
}
},
handleSizeChange2(val) { // 采购单列表分页
this.pageSize2 = val
@@ -543,10 +575,17 @@ export default {
},
searchTable3(row) { // 查询采购计划明细
this.采购计划流水号 = row.采购计划流水号
this.离线采购计划流水号 = row.离线采购计划流水号
this.partNumber ? this.check5 = 1 : this.check5 = 0
searchMateriel(this.采购计划流水号, this.check5, this.partNumber).then(response => {
this.tableData3 = response.data
})
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
@@ -672,19 +711,35 @@ export default {
}
})
} else {
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('录入失败')
}
})
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() {
@@ -784,6 +839,7 @@ export default {
})
},
searchTable5(row) {
console.log(this.userId, this.id)
this.disable = row.是否关联
console.log(this.disable)
this.tableData6 = []
@@ -922,13 +978,15 @@ export default {
} else {
this.工艺计划流水号组 = []
this.采购计划明细流水号组 = []
this.离线采购计划明细流水号组 = []
this.本次到货数量组 = []
this.arrest.map(v => {
this.工艺计划流水号组.push(v.工艺计划流水号)
this.采购计划明细流水号组.push(v.采购计划明细流水号)
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
this.本次到货数量组.push(v.未到货数量)
})
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组).then(response => {
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.userId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('关联成功')
searchMateriel(this.采购计划流水号).then(response => {
@@ -950,7 +1008,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteMateriel(row.到货单明细绑定流水号, row.采购计划明细流水号).then(response => {
deleteMateriel(row.到货单明细绑定流水号, row.采购计划明细流水号, row.离线采购计划明细流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('取消成功')
searchTable6(this.ArrivalOrderMXNumber).then(response => {

View File

@@ -27,104 +27,107 @@
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
@click="pageCurrent1=1;pageSize1=30;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">新增请款</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" prop="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" prop="姓名" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款付款情况" align="center">
<el-table-column label="审批情况内容" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="primary" size="mini" icon="el-icon-search" plain @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || (Number(scope.row.审批情况流水号)===1 && Number(scope.row.付款情况流水号)!==2)" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" plain @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
<span v-show="supplierValue">累计合同总额</span>
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
<span v-show="supplierValue">累计付款</span>
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
<span v-show="supplierValue">累计欠款</span>
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
</div>
</el-card>
<el-row>
<el-col style="width: 1200px">
<el-card>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe @row-click="searchTable02">
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="340">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" prop="请款时间" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.请款时间.substr(0,10) }}
</template>
</el-table-column>
<el-table-column label="请款人" prop="姓名" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" width="90" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<!-- <el-table-column label="请款付款情况" align="center">-->
<el-table-column label="审批情况内容" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="130" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template>
</el-table-column>
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || (Number(scope.row.审批情况流水号)===1 && Number(scope.row.付款情况流水号)!==2)" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" plain @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:40%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
<!-- <span v-show="supplierValue">累计合同总额</span>-->
<!-- <el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>-->
<!-- <span v-show="supplierValue">累计付款</span>-->
<!-- <el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>-->
<!-- <span v-show="supplierValue">累计欠款</span>-->
<!-- <el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>-->
</div>
</el-card>
</el-col>
<el-col style="width: 500px">
<el-card>
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px">
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
@@ -242,7 +245,7 @@ export default {
tableData1: [],
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
pageSize1: 30,
returns: '',
supplierValue: '',
supplier: [],