This commit is contained in:
liushuai
2018-12-22 16:26:16 +08:00
27 changed files with 1593 additions and 395 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -17,8 +17,10 @@
"echarts": "^4.2.0-rc.2",
"element-ui": "2.4.6",
"file-saver": "^1.3.8",
"html2canvas": "^1.0.0-alpha.12",
"jquery": "^3.3.1",
"js-cookie": "2.2.0",
"jspdf": "^1.5.2",
"node-sass": "^4.10.0",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",

View File

@@ -72,14 +72,14 @@ export function searchDirectPart(pageCurrent, pageSize, project_check, project,
})
}
// 人员查询 需要在部门确定之后修改
export function searchPeople() {
export function searchPeople(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=18'
name: '库存管理_人员查询_库存部门',
param: '角色编号=' + data1
}
})
}

View File

@@ -10,6 +10,17 @@ export function searchContract() {
}
})
}
export function searchShopContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_库存管理_车间采购合同查询'
}
})
}
// 仓库查询
export function searchInventory() {
return request({
@@ -33,7 +44,7 @@ export function searchInbound(data1, data2, data3) {
}
})
}
// 入库记录查询
// 车间采购查询
export function searchShopInbound(data1, data2, data3) {
return request({
url: '',
@@ -45,3 +56,78 @@ export function searchShopInbound(data1, data2, data3) {
}
})
}
// 入库单查询
export function searchInboundCard(data1, data2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单查询',
param: '入库单号_check=' + data1 + '&入库单号=' + data2
}
})
}
// 入库单增加
export function addInboundCard(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_采购入库单_入库单增加',
param: '入库日期=' + data1 + '&仓库流水号=' + data2 + '&合同流水号=' + data3 + '&到货单号=' + data4 + '&业务员=' + data5 + '&业务号=' + data6 + '&到货日期=' + data7 + '&业务类型=' + data8 + '&采购类型=' + data9 + '&入库类别=' + data10 + '&备注=' + data11
}
})
}
// 库存角色查询
export function searchAffairPeople(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_人员查询_库存部门',
param: '角色编号=' + data1
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
}
})
}
// 入库单明细增加
export function addInboundCardDetail(data1, data2, data3, data4, data5, data6, data7) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_采购入库单_批量增加入库单明细',
param: '采购入库单流水号=' + data1 + '&名称组=' + data2 + '&型号组=' + data3 + '&规格组=' + data4 + '&图号组=' + data5 + '&数量组=' + data6 + '&本币单价组=' + data7
}
})
}
// 入库单明细查询
export function deleteInboundCardDetail(data1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_采购入库单_采购入库单明细删除',
param: '采购入库单明细流水号=' + data1
}
})
}

View File

@@ -47,14 +47,14 @@ export function searchPart() {
})
}
// 人员查询 需要在部门确定之后修改
export function searchPeople() {
export function searchPeople(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + 18
name: '库存管理_人员查询_库存部门',
param: '角色编号=' + data1
}
})
}

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request'
// 初始化 项目名称
export function getEntryNameValue() {
export function searchtable() {
return request({
url: '',
method: 'post',

View File

@@ -8,7 +8,7 @@ export function initCraftmen() {
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17'
param: '考核部门编号=9'
}
})
}

View File

@@ -67,9 +67,45 @@ export function getParts(Number, pageCurrent, pageSize) {
method: 'post',
data: {
type: '1',
name: '车间生产管理_外协加工任务单明细_查询数据',
name: '车间生产管理工艺_外协发票管理_查询数据',
param: '外协加工任务单流水号=' + Number + '=int',
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 增加
export function edittype(num1, num2, num3, num4, num5, num6, num7, num8) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_外协发票管理_增加数据',
param: '外协加工任务单流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
}
})
}
// 编辑
export function handlechange(num, num2, num3, num4, num5, num6, num7, num8) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_外协发票管理_编辑数据',
param: 'id=' + num + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
}
})
}
// 删除
export function handledelete(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_外协发票管理_删除数据',
param: 'id=' + num
}
})
}

View File

@@ -60,15 +60,14 @@ export function deleteInvoice(num1) {
}
})
}
// 传送人初始化 采购科改16
// 传送人初始化
export function initSender() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=16'
name: '人事档案管理_人员与角色_查询数据_采购员'
}
})
}

View File

@@ -16,8 +16,10 @@ import '@/permission' // permission control
import curd from '@/utils/curd'
import time from 'time-formater'
Vue.use(curd)
import htmlToPdf from '@/vendor/htmlToPdf'
Vue.use(curd)
Vue.use(htmlToPdf)
Vue.use(ElementUI)
// 处理时间字符串格式全局过滤器 '2018/1/23 00:00:00' to '2018-01-23'
Vue.filter('formatTime', function(value) {

View File

@@ -1,78 +1,35 @@
// // /* eslint-disable */
// // import html2Canvas from 'html2canvas'
// // import JsPDF from 'jspdf'
// // export default{
// // install (Vue, options) {
// // Vue.prototype.getPdf = function (id) {
// // let title = this.htmlTitle
// // html2Canvas(document.querySelector(`#${id}`), {
// // allowTaint: true
// // }).then(function (canvas) {
// // let contentWidth = canvas.width
// // let contentHeight = canvas.height
// // let pageHeight = contentWidth / 592.28 * 841.89 //一页pdf显示html页面生成的canvas高度;
// // let leftHeight = contentHeight //未生成pdf的html页面高度
// // let position = 0 //页面偏移
// // let imgWidth = 595.28 //a4纸的尺寸[595.28,841.89]html页面生成的canvas在pdf中图片的宽高
// // let imgHeight = 592.28 / contentWidth * contentHeight
// // let pageData = canvas.toDataURL('image/jpeg', 1.0)
// // window.print(pageData)
// // let PDF = new JsPDF('', 'pt', 'a4')
// // if (leftHeight < pageHeight) { //当内容未超过pdf一页显示的范围无需分页
// // PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
// // } else {
// // while (leftHeight > 0) {
// // PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
// // leftHeight -= pageHeight
// // position -= 841.89
// // if (leftHeight > 0) { //避免添加空白页
// // PDF.addPage()
// // }
// // }
// // }
// // PDF.save(title + '.pdf')
// // }
// // )
// // }
// // }
// // }
//
// /* eslint-disable */
// import html2Canvas from 'html2canvas'
// import JsPDF from 'jspdf'
// export default{
// install (Vue, options) {
// Vue.prototype.getPdf = function (id) {
// let title = this.htmlTitle
// html2Canvas(document.querySelector(`#${id}`), {
// allowTaint: true
// }).then(function (canvas) {
// let contentWidth = canvas.width
// let contentHeight = canvas.height
// let pageHeight = contentWidth / 592.28 * 841.89 //一页pdf显示html页面生成的canvas高度;
// let leftHeight = contentHeight //未生成pdf的html页面高度
// let position = 0 //页面偏移
// let imgWidth = 595.28 //a4纸的尺寸[595.28,841.89]html页面生成的canvas在pdf中图片的宽高
// let imgHeight = 592.28 / contentWidth * contentHeight
// let pageData = canvas.toDataURL('image/jpeg', 1.0)
// window.print(pageData)
// let PDF = new JsPDF('', 'pt', 'a4')
// if (leftHeight < pageHeight) { //当内容未超过pdf一页显示的范围无需分页
// PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
// } else {
// while (leftHeight > 0) {
// PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
// leftHeight -= pageHeight
// position -= 841.89
// if (leftHeight > 0) { //避免添加空白页
// PDF.addPage()
// }
// }
// }
// PDF.save(title + '.pdf')
// }
// )
// }
// }
// }
//
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default {
install(Vue, options) {
Vue.prototype.getPdf = function(id, title) {
html2Canvas(document.querySelector(`#${id}`), {
allowTaint: true
}).then(function(canvas) {
const contentWidth = canvas.width
const contentHeight = canvas.height
const pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
const imgWidth = 595.28
const imgHeight = 592.28 / contentWidth * contentHeight
const pageData = canvas.toDataURL('image/jpeg', 1.0)
const PDF = new JsPDF('', 'pt', 'a4')
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + '.pdf')
}
)
}
}
}

View File

@@ -250,7 +250,8 @@ export default {
},
computed: {
...mapGetters([
'id'
'id',
'token'
])
},
created() {
@@ -292,7 +293,7 @@ export default {
},
searchPeopleData() { // 查询人员
this.People = []
searchPeople().then(response => {
searchPeople(this.token).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.People.push({
label: response.data[i].姓名,

View File

@@ -37,7 +37,9 @@
size="mini"
border
style="width: 100%;"
height="400">
height="400"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column
label="序号"
align="center"
@@ -48,11 +50,21 @@
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" min-width="80">
<el-table-column label="物料规格" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
@@ -63,43 +75,428 @@
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币价" align="center" min-width="80">
<el-table-column label="本币价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="车间采购" name="second">
<el-card>
<span>采购合同编号:</span>
<el-select v-model="ShopContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in ShopContract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="demonstration">入库日期</span>
<el-date-picker
v-model="InboundDate"
type="date"
size="small"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>仓库:</span>
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchShopinfo()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData2"
size="mini"
border
style="width: 100%;"
height="400"
@selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="存货名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选入</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="车间采购" name="second">配置管理</el-tab-pane>
</el-tabs>
<el-card>
<span style="margin: 5px">入库单编号</span>
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchInboundCard1()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addCard()">创建</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="InboundCardDetail()">选入</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="downLoadCjn()">导出</el-button>
<el-table
v-loading="listLoading3"
:data="tableData3"
border
style="width: 100%;"
size="mini"
height="200"
@row-click = "searchDetail">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="入库单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" min-width="100" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
{{ scope.row.入库日期 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="到货单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货单号 }}
</template>
</el-table-column>
<el-table-column label="业务号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.业务号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="业务员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="业务类型" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.业务类型 }}
</template>
</el-table-column>
<el-table-column label="采购类型" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.采购类型 }}
</template>
</el-table-column>
<el-table-column label="入库类别" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.入库类别 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="chooseListinfor(scope.row)">编辑</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total3"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table
v-loading="listLoading4"
:data="tableData4"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200">
<template slot-scope="scope">
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropCarddetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="增加采购入库单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="合同名称" prop="合同名称">
<el-select v-model="form.contract" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in Contract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="仓库名称" prop="仓库名称">
<el-select v-model="form.house" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="入库日期" prop="入库日期">
<el-date-picker v-model="form.inboundDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到货单号" prop="到货单号">
<el-input v-model="form.arrive" placeholder="到货单号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务号" prop="业务号">
<el-input v-model="form.affair" placeholder="业务号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务员" prop="业务员">
<el-select v-model="form.affairPeople" filterable clearable size="small" placeholder="业务员" style="width: 200px">
<el-option
v-for="item in People"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="到货日期" prop="到货日期">
<el-date-picker v-model="form.arriveDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="业务类型" prop="业务类型">
<el-input v-model="form.affirType" placeholder="业务类型" size="small" clearable/>
</el-form-item>
<el-form-item label="采购类型" prop="采购类型">
<el-input v-model="form.purchaseType" placeholder="采购类型" size="small" clearable/>
</el-form-item>
<el-form-item label="备注" prop="备注">
<el-input v-model="form.note" placeholder="备注" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
<el-button type="primary" size="small" @click="submitCard">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible2" title="修改采购入库单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="合同名称" prop="合同名称">
<el-select v-model="form.contract" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in Contract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="仓库名称" prop="仓库名称">
<el-select v-model="form.house" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="入库日期" prop="入库日期">
<el-date-picker v-model="form.inboundDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到货单号" prop="到货单号">
<el-input v-model="form.arrive" placeholder="到货单号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务号" prop="业务号">
<el-input v-model="form.affair" placeholder="业务号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务员" prop="业务员">
<el-select v-model="form.affairPeople" filterable clearable size="small" placeholder="业务员" style="width: 200px">
<el-option
v-for="item in People"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="到货日期" prop="到货日期">
<el-date-picker v-model="form.arriveDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="业务类型" prop="业务类型">
<el-input v-model="form.affirType" placeholder="业务类型" size="small" clearable/>
</el-form-item>
<el-form-item label="采购类型" prop="采购类型">
<el-input v-model="form.purchaseType" placeholder="采购类型" size="small" clearable/>
</el-form-item>
<el-form-item label="备注" prop="备注">
<el-input v-model="form.note" placeholder="备注" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
<el-button type="primary" size="small" @click="editCard">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchContract, searchInventory, searchInbound } from '@/api/Inventory/InboundCard'
import { searchContract, searchInventory, searchInbound, searchShopInbound, searchInboundCard, addInboundCard, searchAffairPeople, addInboundCardDetail, searchInboundCardDetail, deleteInboundCardDetail, searchShopContract } from '@/api/Inventory/InboundCard'
import { mapGetters } from 'vuex'
export default {
data() {
return {
Contract: [],
Contract: [], // 采购合同
ShopContract: [], // 车间采购合同
ContractValue: '',
ShopContractValue: '', // 车间采购合同流水号
Inventory: [],
InventoryValue: '',
InboundDate: '',
listLoading: '',
tableData: [],
activeName: 'first'
activeName: 'first',
listLoading2: '',
tableData2: [],
listLoading3: '',
inboundCardNumber: '',
inboundCardNumber_check: '',
tableData3: [],
listLoading4: '',
tableData4: [],
dialogVisible1: false,
dialogVisible2: false,
People: [],
form: {
contract: '',
house: '',
inboundDay: '',
arrive: '',
affair: '',
affairPeople: '',
arriveDay: '',
affirType: '',
purchaseType: '',
inboundType: '',
note: ''
},
rules: { // 表单验证规则
contract: [{ required: true, message: '请选择合同', trigger: 'blur' }],
house: [{ required: true, message: '请选择仓库', trigger: 'blur' }],
inboundDay: [{ required: true, message: '请输入入库日期', trigger: 'blur' }],
arrive: [{ required: true, message: '请输入到货单号', trigger: 'blur' }],
affair: [{ required: true, message: '请输入业务号', trigger: 'blur' }],
affairPeople: [{ required: true, message: '请选择业务员', trigger: 'blur' }],
affirType: [{ required: true, message: '请输入入库日期', trigger: 'blur' }],
purchaseType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }],
inboundType: [{ required: true, message: '请输入入库类别', trigger: 'blur' }],
note: [{ required: true, message: '请输入备注', trigger: 'blur' }]
},
nameGroup: [],
modelGroup: [],
specificationGroup: [],
paintGroup: [],
numberGroup: [],
priceGroup: [],
DetailNumber: '',
CardDetailNumber: '' // 入库单明细流水号
}
},
computed: {
...mapGetters([
'id'
'id',
'token'
])
},
created() {
@@ -116,6 +513,24 @@ export default {
})
}
})
// 查询车间合同
searchContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ShopContract.push({
label: response.data[i].采购合同编号,
value: response.data[i].采购合同流水号
})
}
})
searchShopContract
searchAffairPeople(this.token).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.People.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchInventoryData() { // 查询仓库
searchInventory().then(response => {
@@ -131,10 +546,131 @@ export default {
this.tableData = []
this.listLoading = true
searchInbound(this.ContractValue, this.InboundDate, this.InventoryValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].组件零件流水号 !== 0) {
response.data[i].物料名称 = response.data[i].零件名称
}
}
this.tableData = response.data
this.total = response.data.total
this.listLoading = false
})
},
searchShopinfo() {
this.tableData2 = []
this.listLoading2 = true
searchShopInbound(this.ShopContractValue, this.InboundDate, this.InventoryValue).then(response => {
this.tableData2 = response.data
this.total = response.data.total
this.listLoading2 = false
})
},
searchInboundCard1() {
if (this.inboundCardNumber === '') {
this.inboundCardNumber_check = 0
} else {
this.inboundCardNumber_check = 1
}
this.tableData3 = []
this.listLoading3 = true
searchInboundCard(this.inboundCardNumber_check, this.inboundCardNumber).then(response => {
this.tableData3 = response.data
this.listLoading3 = false
})
},
addCard() {
this.dialogVisible1 = true
},
submitCard() { // 提交设置
this.$refs['form'].validate((valid) => {
if (valid) {
addInboundCard(this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
} else {
this.$message.error('增加失败')
}
})
}
})
},
handleSelectionChange(val) {
this.nameGroup = []
this.modelGroup = []
this.specificationGroup = []
this.paintGroup = []
this.numberGroup = []
this.priceGroup = []
for (let i = 0; i < val.length; i++) {
this.nameGroup.push(val[i].物料名称)
this.modelGroup.push(val[i].物料规格)
this.specificationGroup.push(val[i].物料型号)
this.paintGroup.push(val[i].零件图号)
this.numberGroup.push(val[i].实际到货数量)
this.priceGroup.push(val[i].单价)
}
},
handleSelectionChange2(val) {
this.nameGroup = []
this.modelGroup = []
this.specificationGroup = []
this.paintGroup = []
this.numberGroup = []
this.priceGroup = []
for (let i = 0; i < val.length; i++) {
this.nameGroup.push(val[i].物料名称)
this.modelGroup.push(val[i].物料规格)
this.specificationGroup.push(val[i].物料型号)
this.paintGroup.push(val[i].零件图号)
this.numberGroup.push(val[i].实际到货数量)
this.priceGroup.push(val[i].单价)
}
},
InboundCardDetail() {
addInboundCardDetail(this.DetailNumber, this.nameGroup, this.modelGroup, this.specificationGroup, this.paintGroup, this.numberGroup, this.priceGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
} else {
this.$message.error('增加失败')
}
})
},
// 查询采购入库单明细
searchDetail(row) {
this.DetailNumber = row.采购入库单流水号
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
},
// 删除领料单明细
dropCarddetail(row) {
this.CardDetailNumber = row.采购入库单明细流水号
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInboundCardDetail(this.CardDetailNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
} else {
this.$message.error('数据占用')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}

View File

@@ -315,7 +315,6 @@ export default {
// 获取人员编号
getpeopleid() {
this.role = this.token
console.log(this.role, 321312)
this.searchPeopleData()
},
// 查询仓库

View File

@@ -183,7 +183,8 @@ export default {
},
computed: {
...mapGetters([
'id'
'id',
'token'
])
},
created() {
@@ -263,7 +264,7 @@ export default {
this.dialogFormVisible = false
},
searchPeopleData() { // 查询人员
searchPeople().then(response => {
searchPeople(this.token).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.People.push({
label: response.data[i].姓名,

View File

@@ -656,14 +656,19 @@ export default {
this.listLoading1 = true
this.listLoadingx = true
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
console.log(response)
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].组件零件基本件流水号 === '0') {
response.data.rows[i].零件类型 = response.data.rows[i].零件类型代码
response.data.rows[i].类型名称 = response.data.rows[i].外购件类型
}
}
this.tableDataPurchase = response.data.rows
console.log(this.tableDataPurchase, 124124)
this.listLoading = false
this.total1 = response.data.total
})
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
const data = response.data.rows
console.log(data, 323423)
for (let i = 0; i < data.length; i++) {
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}

View File

@@ -0,0 +1,122 @@
<template>
<div class="app-container">
<el-card>
<el-button type="success" class="el-icon-search" size="small">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border>
<el-table-column
label=" "
align="center"
type="index"
width="50"/>
<el-table-column label="外协厂家名称" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.外协厂家名称 }}
</template>
</el-table-column>
<el-table-column label="外协厂家简称" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.外协厂家简称 }}
</template>
</el-table-column>
<el-table-column label="地址" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column label="联系人" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="电话" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="设备情况" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.设备情况 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
<el-button
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading0"
:current-page="pageCurrent"
: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>
</div>
</template>
<script>
import {} from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
export default {
data() {
return {
loading0: false,
tableData: [], // 表格数据
pageSize: 10,
pageCurrent: 1,
total: 0
}
},
created() {
},
methods: {
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-input{
width: 210px;
}
</style>

View File

@@ -0,0 +1,38 @@
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default {
install(Vue, options) {
Vue.prototype.getPdf = function() {
console.log(document)
var title = '12' // this.htmlTitle
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(function(canvas) {
const contentWidth = canvas.width
const contentHeight = canvas.height
const pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
const imgWidth = 595.28
const imgHeight = 592.28 / contentWidth * contentHeight
const pageData = canvas.toDataURL('image/jpeg', 1.0)
const PDF = new JsPDF('', 'pt', 'a4')
console.log(PDF, 99)
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + '.pdf')
}
)
}
}
}

View File

@@ -87,7 +87,7 @@
size="mini"
type="warning"
icon="el-icon-edit"
@click.stop="exportTable()">导出</el-button>
@click.stop="exportTable(scope.row)">导出</el-button>
<el-button
size="mini"
type="primary"
@@ -508,12 +508,12 @@
<el-input v-model="form2.名称" size="small" style="width: 200px" disabled/>
</el-form-item>
<el-form-item label="数量" prop="数量" label-width="110px">
<el-input-number v-model="form2.数量" :min="0" :max="maxNum" :precision="2" :step="1" controls-position="right" size="small" style="width: 200px" placeholder="请输入本次付款金额"/>
<el-input-number v-model="form2.数量" :min="0" :max="maxNum" controls-position="right" size="small" style="width: 200px" placeholder="请输入本次付款金额"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible3 = false">取消</el-button>
<el-button type="primary" @click="submitMoveInto('form2')"> </el-button>
<el-button :loading="btnLoading" @click="dialogFormVisible3 = false">取消</el-button>
<el-button :loading="btnLoading" type="primary" @click="submitMoveInto('form2')"> </el-button>
</div>
</el-dialog>
@@ -527,81 +527,86 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible4 = false">取消</el-button>
<el-button type="primary" @click="submitRremove('form3')"> </el-button>
<el-button :loading="btnLoading" @click="dialogFormVisible4 = false">取消</el-button>
<el-button :loading="btnLoading" type="primary" @click="submitRremove('form3')" > </el-button>
</div>
</el-dialog>
<el-card>
<div style="width: 100%">
<table id="table" class="tg" style="table-layout: fixed; width: 1228px;margin: auto;left: 50%;right: 50%">
<colgroup>
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
</colgroup>
<tr>
<th class="tg-v15n" colspan="8" style="font-size: 38px">江苏高精机电装备有限公司</th>
<th class="tg-c3ow" rowspan="2" style="text-align: center; line-height: 114px">二维码</th>
</tr>
<tr>
<td class="tg-uys7" colspan="8" style="text-align: center;font-size: 26px">{{ 装箱单名称 }}发货单</td>
</tr>
<tr>
<td class="tg-c3ow">发货单号</td>
<td class="tg-c3ow" colspan="2">{{ 发货单号 }}</td>
<td class="tg-c3ow">收货人</td>
<td class="tg-c3ow" colspan="2">{{ 收货人 }}</td>
<td class="tg-c3ow">联系电话</td>
<td class="tg-c3ow" colspan="2">{{ 联系电话 }}</td>
</tr>
<tr>
<td class="tg-c3ow">收货地址</td>
<td class="tg-c3ow" colspan="2">{{ 收货地址 }}</td>
<td class="tg-c3ow">委托车辆</td>
<td class="tg-c3ow" colspan="2">{{ 委托车辆 }}</td>
<td class="tg-c3ow">发货日期</td>
<td class="tg-c3ow" colspan="2">{{ 发货日期 }}</td>
</tr>
<tr>
<td class="tg-c3ow">序号</td>
<td class="tg-c3ow"></td>
<td class="tg-c3ow" colspan="2">名称</td>
<td class="tg-c3ow">规格</td>
<td class="tg-c3ow">数量</td>
<td class="tg-c3ow" colspan="2">备注</td>
<td class="tg-c3ow">确认</td>
</tr>
<tr v-for="(list, index) in table" :key="index">
<td class="tg-c3ow">{{ index + 1 }}</td>
<td class="tg-c3ow">{{ list.代号 }}</td>
<td class="tg-c3ow" colspan="2">{{ list.名称 }}</td>
<td class="tg-c3ow">{{ list.规格 }}</td>
<td class="tg-c3ow">{{ list.数量 }}</td>
<td class="tg-c3ow" colspan="2">{{ list.备注 }}</td>
<td class="tg-c3ow"/>
</tr>
<tr>
<td class="tg-c3ow" colspan="7">本清单一式两份一份请收货人清点货物一份请签收人签收后交还司机带回本公司请签收人在货物卸车后立即清点</td>
<td class="tg-c3ow">签收人签字</td>
<td class="tg-c3ow"/>
</tr>
</table>
<el-dialog :visible.sync="DeliveryVisiable" width="70%" center>
<el-card>
<div id="pdfDom" style="width: 100%">
<table id="table" class="tg" style="table-layout: fixed; width: 1228px;margin: auto;left: 50%;right: 50%">
<colgroup>
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
</colgroup>
<tr>
<th class="tg-v15n" colspan="8" style="font-size: 30px">江苏高精机电装备有限公司</th>
<th class="tg-c3ow" rowspan="2" style="text-align: center; line-height: 17px"><img id="img" alt="" src="http://123.206.50.60:8412/#/searchBoxDetails/index?id="></th>
</tr>
<tr>
<td class="tg-uys7" colspan="8" style="text-align: center;font-size: 20px">{{ 装箱单名称 }}发货单</td>
</tr>
<tr>
<td class="tg-c3ow">发货单号</td>
<td class="tg-c3ow" colspan="2">{{ 发货单号 }}</td>
<td class="tg-c3ow">收货人</td>
<td class="tg-c3ow" colspan="2">{{ 收货人 }}</td>
<td class="tg-c3ow">联系电话</td>
<td class="tg-c3ow" colspan="2">{{ 联系电话 }}</td>
</tr>
<tr>
<td class="tg-c3ow">收货地址</td>
<td class="tg-c3ow" colspan="2">{{ 收货地址 }}</td>
<td class="tg-c3ow">委托车辆</td>
<td class="tg-c3ow" colspan="2">{{ 委托车辆 }}</td>
<td class="tg-c3ow">发货日期</td>
<td class="tg-c3ow" colspan="2">{{ 发货日期 }}</td>
</tr>
<tr>
<td class="tg-c3ow"></td>
<td class="tg-c3ow">代号</td>
<td class="tg-c3ow" colspan="2">名称</td>
<td class="tg-c3ow">规格</td>
<td class="tg-c3ow">数量</td>
<td class="tg-c3ow" colspan="2">备注</td>
<td class="tg-c3ow">确认</td>
</tr>
<tr v-for="(list, index) in table" :key="index">
<td class="tg-c3ow">{{ index + 1 }}</td>
<td class="tg-c3ow">{{ list.代号 }}</td>
<td class="tg-c3ow" colspan="2">{{ list.名称 }}</td>
<td class="tg-c3ow">{{ list.规格 }}</td>
<td class="tg-c3ow">{{ list.数量 }}</td>
<td class="tg-c3ow" colspan="2">{{ list.备注 }}</td>
<td class="tg-c3ow"/>
</tr>
<tr>
<td class="tg-c3ow" colspan="7">本清单一式两份一份请收货人清点货物一份请签收人签收后交还司机带回本公司请签收人在货物卸车后立即清点</td>
<td class="tg-c3ow">签收人签字</td>
<td class="tg-c3ow"/>
</tr>
</table>
</div>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffDownLoadDelivery()">取消</el-button>
<el-button type="primary" @click="downLoadDelivery()">打印</el-button>
</div>
</el-card>
</el-dialog>
</div>
</template>
<script>
import request from '@/utils/request'
// import { sleep } from '@/utils/tool'
import elInput from 'element-ui/packages/input'
import { exportExcelMethod } from './exportExcel'
import $ from 'jquery'
import { selectDelivery, submitRremove, searchCargoBoxDetailed, submitMoveInto, delCargoBox, addCargoBox, searchCargoBox, editInvoice, delInvoice, addInvoice, editAdress, addAdress, deleteAdress, citySearch, provinceSearch, addressSearch, searchParts, searchHost, searchSparePart, searchProjectName, searchPackingList, searchFile, searchInvoice } from '@/api//MarketingCenter/DeliveryManagement'
import QRCode from 'qrcode'
export default {
@@ -610,10 +615,12 @@ export default {
},
data() {
return {
btnLoading: false,
table: [],
canvas: [],
show: false,
num: '',
DeliveryVisiable: false,
fileList: [],
发货单号: '',
收货人: '',
@@ -684,6 +691,7 @@ export default {
dialogFormVisible3: false, // 填充货箱内货物对话框显示隐藏
dialogFormVisible4: false, // 移除货箱内货物对话框显示隐藏
QueryDetail: '',
QueryDetail1: '',
dialogImageUrl: '',
dialogVisible: false,
Transport: [
@@ -818,7 +826,7 @@ export default {
return data
}).then(res => {
for (let i = 0; i < res.length; i++) {
QRCode.toCanvas(document.getElementById(this.canvas[i]), 'http://192.168.0.110:8080/#/DeliveryManagement/index?id=' + res[i].发货单编号.toString(), function(error) {
QRCode.toCanvas(document.getElementById(this.canvas[i]), 'http://123.206.50.60:8412/#/DeliveryManagement/index?id=' + res[i].发货单编号.toString(), function(error) {
if (error) console.error(error)
console.log('success!')
})
@@ -995,18 +1003,6 @@ export default {
this.invoiceNum = row.发货单编号
this.getFileList()
this.getSelect(searchCargoBox, ['货箱号', '货箱号编号'], 'cargoBox', this.invoiceNum)
selectDelivery(this.invoiceNum).then(response => {
this.table = response.data
this.装箱单名称 = response.data[0].装箱单名称
this.发货单号 = response.data[0].发货单号
this.收货人 = response.data[0].联系人
this.收货地址 = response.data[0].省份 + response.data[0].市名 + response.data[0].详细地址
this.委托车辆 = response.data[0].车辆牌号
this.联系电话 = response.data[0].联系方式
if (response.data[0].发货日期 !== '' || response.data[0].发货日期 !== null) {
this.发货日期 = response.data[0].发货日期.substring(0, response.data[0].发货日期.length - 8)
}
})
},
addCargoBox() {
this.$confirm('此操作将新增货箱, 是否继续?', '提示', {
@@ -1124,7 +1120,9 @@ export default {
}
},
submitMoveInto() {
this.btnLoading = true
submitMoveInto(this.cargoBoxValue, this.goodsCodeName, this.goodsName, this.goodsSpecifications, this.form2.数量, this.goodsRemark, this.partsCode, this.sparePartCode, this.fileCode).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.form2.名称 = ''
@@ -1154,7 +1152,9 @@ export default {
}
},
submitRremove() {
this.btnLoading = true
submitRremove(this.DetailOfGoodsCode, this.form3.数量, this.partsCode, this.sparePartCode, this.fileCode, this.cargoBoxValue).then(response => {
this.btnLoading = false
this.dialogFormVisible4 = false
this.form3.名称 = ''
this.form3.数量 = ''
@@ -1183,7 +1183,7 @@ export default {
// 生成的二维码内容,可以添加变量
this.QueryDetail = this.cargoBoxValue.toString()
var canvas = document.getElementById('canvas')
QRCode.toCanvas(canvas, 'http://192.168.0.110:8080/#/searchBoxDetails/index?id=' + this.QueryDetail, function(error) {
QRCode.toCanvas(canvas, 'http://123.206.50.60:8412/#/searchBoxDetails/index?id=' + this.QueryDetail, function(error) {
if (error) console.error(error)
console.log('success!')
})
@@ -1254,13 +1254,55 @@ export default {
this.$message.error('上传失败')
}
},
exportTable() {
exportExcelMethod('table', '发货单', 'sheet1')
exportTable(row) {
this.QueryDetail1 = row.发货单编号.toString()
this.invoiceNum = row.发货单编号
this.DeliveryVisiable = true
selectDelivery(this.invoiceNum).then(response => {
this.table = response.data
this.装箱单名称 = response.data[0].装箱单名称
this.发货单号 = response.data[0].发货单号
this.收货人 = response.data[0].联系人
this.收货地址 = response.data[0].省份 + response.data[0].市名 + response.data[0].详细地址
this.委托车辆 = response.data[0].车辆牌号
this.联系电话 = response.data[0].联系方式
if (response.data[0].发货日期 !== '' || response.data[0].发货日期 !== null) {
this.发货日期 = response.data[0].发货日期.substring(0, response.data[0].发货日期.length - 8)
}
return this.QueryDetail1
}).then(data => {
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
QRCode.toDataURL('http://123.206.50.60:8412/#/DeliveryManagement/index?id=' + data, opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img')
img.src = url
})
})
},
clearProject() {
this.cargoBox = []
this.cargoBoxValue = ''
this.tableData6 = []
this.fileList = []
},
downLoadDelivery() {
const htmlNode = $('#pdfDom').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
printNode.remove()
},
callOffDownLoadDelivery() {
this.DeliveryVisiable = false
}
}
}
@@ -1275,9 +1317,14 @@ export default {
width: 120px !important;
height: auto!important;
}
#img{
width: 120px !important;
height: 120px !important;
margin-top: 5px;
}
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:0px 0px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg .tg-v15n{font-weight:bold;font-size:24px;border-color:inherit;text-align:center}
.tg .tg-c3ow{border-color:inherit;text-align:center;vertical-align:top}
.tg .tg-kluc{font-size:24px;border-color:inherit;text-align:center}

View File

@@ -56,7 +56,7 @@
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中" @row-click="getParts">
<el-table-column
label=" "
type="index"
@@ -170,14 +170,20 @@
{{ scope.row.扣款说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right">
<el-table-column label="操作" align="center" width="300px" fixed="right">
<template slot-scope="scope">
<el-button
:disabled="scope.row.实际付款时间!==''"
size="mini"
type="primary"
class="el-icon-check"
@click="editType1(scope.row, 'form');param = 0">到票</el-button>
<el-button
:disabled="scope.row.实际付款时间!==''"
size="mini"
type="primary"
class="el-icon-edit"
@click="Withdrawing(scope.$index, scope.row, 'form')">扣款</el-button>
@click="Withdrawing(scope.$index, scope.row, 'form2')">扣款</el-button>
<el-button
:disabled="scope.row.实际付款时间!==''||scope.row.单据状态!=='3'"
size="mini"
@@ -200,36 +206,57 @@
</div>
</el-card>
<el-card v-if="false">
<el-table v-loading="loading2" :data="tableData2" height="370" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column
label=" "
type="index"
align="center"
width="50"/>
<el-table-column label="零件图号" align="center" width="230px">
<el-card>
<el-table v-loading="loading2" :data="tableData2" :summary-method="getSummaries" height="370" show-summary style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="发票号" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.零件图 }}
{{ scope.row.发票 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="230px">
<el-table-column label="开票金额" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" width="220px">
<el-table-column label="接收人" align="center" width="180px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
{{ scope.row.接收人 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center">
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="180px">
<el-table-column label="开票日期" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
{{ 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" width="200px" fixed="right">
<template slot-scope="scope">
<el-button
:disabled="fukuanshijian!==''"
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
<el-button
:disabled="fukuanshijian!==''"
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -267,14 +294,96 @@
</div>
</el-dialog>
<el-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>
<el-col :span="12">
<el-form-item label="发票号" prop="发票号" >
<el-input v-model="form.发票号" placeholder="发票号" style="width:200px" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票金额" prop="开票金额">
<el-input v-model="form.开票金额" placeholder="开票金额" style="width:200px" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开票时间" prop="开票时间">
<el-date-picker
v-model="form.开票时间"
style="width:200px"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
clearable
placeholder="开票时间"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行" prop="开户行">
<el-input v-model="form.开户行" placeholder="开户行" style="width:200px" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="接收人" prop="接收人">
<el-input v-model="form.接收人" placeholder="接收人" style="width:200px" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="接收时间" prop="接收时间">
<el-date-picker
v-model="form.接收时间"
style="width:200px"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
clearable
placeholder="接收时间"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="备注">
<el-input v-model="form.备注" :rows="2" placeholder="备注" type="textarea" style="width:527px" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit('form')" >确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
import { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts, edittype, handlechange, handledelete } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
export default {
data() {
return {
fukuanshijian: '',
title1: '',
dialogFormVisible: false,
renwudan: '',
count1: 0,
count2: 0,
form: {
发票号: '',
开户行: '',
开票时间: '',
开票金额: '',
接收人: '',
接收时间: '',
备注: ''
},
实际付款时间: '',
loading: false,
loading2: false,
@@ -287,6 +396,8 @@ export default {
扣款说明: ''
},
rules: {
发票号: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
开票金额: [{ required: true, message: '请输入开票金额', trigger: 'blur' }],
扣款说明: [{ required: true, message: '请输入扣款说明', trigger: 'blur' }]
},
date1: '',
@@ -314,6 +425,32 @@ export default {
this.fetchData()
},
methods: {
getSummaries(param) {
console.log(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] = 'N/A'
}
})
return sums
},
// 初始化外协厂家
fetchData() {
this.ManufacturerName = []
@@ -436,13 +573,146 @@ export default {
this.loading2 = true
this.tableData2 = []
this.zhongjianbianliang = row.外协加工任务单流水号
this.fukuanshijian = row.实际付款时间
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).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(' '))
response.data.rows[i].接收时间 = response.data.rows[i].接收时间.substring(0, response.data.rows[i].接收时间.indexOf(' '))
}
this.tableData2 = response.data.rows
this.total2 = response.data.total
}).then(() => {
this.loading2 = false
})
},
getParts2() {
this.loading2 = true
this.tableData2 = []
getParts(this.zhongjianbianliang, this.pageCurrent2, this.pageSize2).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(' '))
response.data.rows[i].接收时间 = response.data.rows[i].接收时间.substring(0, response.data.rows[i].接收时间.indexOf(' '))
}
this.tableData2 = response.data.rows
this.total2 = response.data.total
}).then(() => {
this.loading2 = false
})
},
// 点击增加
editType1(row, formName) {
this.count1 = this.count1 + 1
if (this.count1 !== 1) {
this.$refs[formName].resetFields()
}
this.title1 = '增加'
this.renwudan = row.外协加工任务单流水号
this.form.发票号 = ''
this.form.开户行 = ''
this.form.开票时间 = ''
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 => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息增加成功',
type: 'success'
})
this.getParts2()
} else {
this.$message.error('信息增加失败')
}
})
this.dialogFormVisible = false
},
// 编辑打开
handleChange1(index, row, formName) {
this.count2 = this.count2 + 1
if (this.count2 !== 1) {
this.$refs[formName].resetFields()
}
this.form.发票号 = row.发票号
this.form.开户行 = row.开户行
this.form.开票时间 = row.开票时间
this.form.开票金额 = row.开票金额
this.form.接收人 = row.接收人
this.form.接收时间 = row.接收时间
this.form.备注 = row.备注
this.dialogFormVisible = true
this.title1 = '编辑'
this.CoManufacturerFlowNumber1 = row.id
},
// 编辑确定
handleChange() {
handlechange(this.CoManufacturerFlowNumber1, 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()
} else {
this.$message.error('信息修改失败')
}
})
this.dialogFormVisible = false
},
// 提交添加或者修改
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.param === 0) {
this.editType()
} else {
this.handleChange()
}
} else {
return false
}
})
},
// 重置表单
callOff(formName) {
this.dialogFormVisible = false
this.$refs[formName].resetFields()
},
// 删除
handleDelete(index, row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handledelete(row.id).then(response => {
if (this.tableData2 && this.tableData2.length === 1 && this.pageCurrent2 > 1) {
this.pageCurrent2--
}
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息删除成功',
type: 'success'
})
this.getParts2()
} else {
this.$message.error('信息删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
@@ -456,19 +726,12 @@ export default {
handleSizeChange2(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.tableData2 = []
getParts(this.zhongjianbianliang, this.pageCurrent2, this.pageSize2).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
this.getParts2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.tableData2 = []
getParts(this.zhongjianbianliang, this.pageCurrent2, this.pageSize2).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
this.getParts2()
}
}
}
@@ -478,9 +741,8 @@ export default {
.el-card{
margin-bottom: 15px;
}
</style>
<style>
.el-table .fukuan {
background: #AEF199;
}
</style>

View File

@@ -5,7 +5,7 @@ export function exportExcelMethod(tableId, fileName, sheetName) {
const tableToExcel = (function() {
const uri = 'data:application/vnd.ms-excel;base64,'
// 设置导出表格的单元格默认高度/宽度/边框样式/字体颜色/背景颜色/居中网页显示表格宽度建议1240tr/td视情况而定
const template = `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><meta charset="UTF-8"><style type="text/css">table td {border: 2px solid #000000;width:100px;text-align: center;color: #000000;}</style></head><body><table>{table}</table></body></html>`
const template = `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><meta charset="UTF-8"><style type="text/css">table td {border: 2px solid #000000;height:40px;text-align: center;color: #000000;}</style></head><body><table>{table}</table></body></html>`
const base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
const format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p] }) }
return function(table, filename, sheetname) {

View File

@@ -295,12 +295,12 @@
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<el-table-column label="数量" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="70">
<el-table-column label="询价单编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.询价单编号 }}
</template>
@@ -313,6 +313,37 @@
</el-table>
</el-card>
<div id="inquirySheet" style="width: 1000px;margin: 0 auto;display:none">
<table class="inquirySheet" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th style="border: none;text-align:left;font-size: 30px;font-weight: bold" colspan="3"><div style="margin: 10px;">GAOJING</div></th>
<th style="border: none;text-align:center;font-size: 30px;font-weight: bold" colspan="8"><div style="margin: 10px;">采购询价单</div></th>
<th style="border: none;" colspan="3"/>
</tr>
<tr>
<td style="border: none;" colspan="2">询价单编号:</td>
<td id="inquirySheetNum" style="border: none;" colspan="4"/>
<td style="border: none;" colspan="2">供应商名称:</td>
<td id="supplier" style="border: none;" colspan="6"/>
</tr>
<tr id="tablehead">
<td width="8.3%">序号</td>
<td width="16.6%" colspan="2">图号</td>
<td width="16.6%" colspan="2">名称</td>
<td width="16.6%" colspan="2">规格</td>
<td width="16.6%" colspan="2">数量</td>
<td width="16.6%" colspan="2">单价</td>
<td colspan="3">备注</td>
</tr>
<tr>
<td colspan="2">合计</td>
<td colspan="5"/>
<td colspan="4"/>
<td colspan="3"/>
</tr>
</table>
</div>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
@@ -494,6 +525,7 @@
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
import { exportExcelMethod } from './exportExcel'
export default {
name: '', // 创建询价单
@@ -765,20 +797,34 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// import('@/vendor/Export2Excelcjn').then(excel => {
// const tHeader = ['询价单编号', '供应商名称', '物料名称', '物料规格', '物料型号', '数量', '单价', '备注'] // 表头内容
// const filterVal = ['询价单编号', '供应商名称', '物料名称', '物料规格', '物料型号', '零件数量'] // tableData3里的属性名
// const list = this.tableData3
// const data = list.map(v => filterVal.map(j => v[j]))
// excel.export_json_to_excel({
// header: tHeader,
// data,
// filename: row.询价单编号 + '_' + row.供应商名称,
// autoWidth: true,
// bookType: 'xlsx'
// })
// })
}).catch(() => {
const children = document.getElementsByClassName('tableData')
const parent = document.getElementsByClassName('inquirySheet')[0]
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
let length = 0
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
document.getElementById('tablehead').after(tr[i])
}
for (let j = 0; j < this.tableData3.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData3[j].物料型号 || this.tableData3[j].零件图号
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料名称 || this.tableData3[j].零件名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料规格 || this.tableData3[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
}
document.getElementById('inquirySheetNum').innerHTML = row.询价单编号
document.getElementById('supplier').innerHTML = row.供应商名称
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
}).catch(res => {
console.log(res)
this.$message({
type: 'info',
message: '已取消操作'
@@ -946,7 +992,7 @@ export default {
this.materialOldValue = row.物料流水号
},
partChange(row) { // 零件变更 基本件
alert('没有基本件库,你想替换啥?')
alert('没有基本件库')
console.log(row)
},
searchMaterial() {
@@ -988,6 +1034,10 @@ export default {
</script>
<style scoped>
.inquirySheet td{
height: 40px;
text-align: center;
}
.el-card{
margin-bottom: 15px;
}

View File

@@ -422,40 +422,36 @@
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="8" style="font-size: 30px;font-weight: bold">离线合同</th>
<th colspan="14"><h4>离线合同</h4></th>
</tr>
<tr>
<td colspan="2" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td>合同名称</td>
<td id="contractName"/>
<td>供应商</td>
<td id="supplier"/>
<td colspan="2" rowspan="2" style="width: 40px;height: 100px;">二维码粘贴处</td>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td width="80px">合同名称</td>
<td id="contractName" colspan="3" style="text-align: left;"/>
<td width="80px">供应商</td>
<td id="supplier" colspan="4" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2">二维码粘贴处</td>
</tr>
<tr>
<td>合同编号</td>
<td id="contractNum"/>
<td>采购员</td>
<td id="buyer"/>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="3" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="4" style="text-align: left;"/>
</tr>
<tr id="tablehead">
<td>序号</td>
<td>名称</td>
<td>规格</td>
<td>型号</td>
<td>数量</td>
<td>单价</td>
<td>合计</td>
<td colspan="2">名称</td>
<td colspan="2">规格</td>
<td colspan="2">型号</td>
<td colspan="2">数量</td>
<td colspan="2">单价</td>
<td colspan="2">合计</td>
<td>备注</td>
</tr>
<tr>
<td>总计</td>
<td/>
<td/>
<td/>
<td/>
<td/>
<td id="total"/>
<td colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
</tr>
</table>
@@ -466,7 +462,8 @@
<script>
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
import { exportExcelMethod } from './exportExcel'
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
export default {
@@ -587,6 +584,20 @@ export default {
this.searchTable2()
},
methods: {
useqrcode(contractNum) {
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
rendererOpts: {
quality: 0.3
}
}
QRCode.toDataURL(contractNum, opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img')
img.src = url
})
},
fetchData() {},
searchTable1() { // 查询物料库物料
this.loading1 = true
@@ -928,10 +939,12 @@ export default {
}
}
const tr = []
for (let i = 0; i < this.tableData3.length; i++) {
let length = 0
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td/><td/><td/><td/><td/><td/><td/><td/>`
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/>`
document.getElementById('tablehead').after(tr[i])
}
let total = 0
@@ -951,7 +964,17 @@ export default {
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.采购员
document.getElementById('total').innerHTML = total
exportExcelMethod('offlineContract', '离线合同', '离线合同sheet')
$('#qrCode').html(`<img id="img" style="display: block;margin: 0 auto">`)
this.useqrcode(row.离线合同流水号) // 显示二维码
}).then(() => {
const htmlNode = $('#offlineContract').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
printNode.remove()
}).catch(res => {
console.log(res)
this.$message({
@@ -965,6 +988,10 @@ export default {
</script>
<style scoped>
.offlineContract td{
height: 40px;
text-align: center;
}
.el-card{
margin-bottom: 15px;
}

View File

@@ -24,6 +24,37 @@
<el-card>
<el-table v-loading="" :data="tableData1" stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-form-item label="交货日期">
{{ scope.row.交货日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付日期">
{{ scope.row.支付日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付方式">
{{ scope.row.支付方式 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票信息">
{{ scope.row.开票信息 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="其他说明">
{{ scope.row.其他说明 }}
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="采购合同号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
@@ -44,26 +75,6 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="70" fixed="right">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
@@ -189,4 +200,7 @@ export default {
.el-tag{
margin: 0
}
.el-form-item {
margin: 0;
}
</style>

View File

@@ -40,6 +40,37 @@
height="300px"
highlight-current-row
@row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form id="table" label-position="left" inline class="demo-table-expand">
<el-row>
<el-form-item label="交货日期">
{{ scope.row.交货日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付日期">
{{ scope.row.支付日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付方式">
{{ scope.row.支付方式 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票信息">
{{ scope.row.开票信息 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="其他说明">
{{ scope.row.其他说明 }}
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="采购合同号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
@@ -65,31 +96,6 @@
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button>
@@ -286,7 +292,7 @@ export default {
}
</style>
<style>
.tableData{
height: 30px;
#table .el-form-item {
margin: 0;
}
</style>

View File

@@ -59,10 +59,41 @@
:data="tableData1"
size="mini"
border
style="width: 100%;max-height: 300px;"
height="300px"
style="width: 100%;max-height: 350px;"
height="350px"
highlight-current-row
@row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-form-item label="交货日期">
{{ scope.row.交货日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付日期">
{{ scope.row.支付日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付方式">
{{ scope.row.支付方式 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票信息">
{{ scope.row.开票信息 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="其他说明">
{{ scope.row.其他说明 }}
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="审批情况" align="center" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
@@ -95,31 +126,6 @@
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="未通过原因" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.未通过原因 }}
@@ -138,10 +144,6 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<div style="margin:5px;float: left">
<b>二维码</b><br>
<img id="img">
</div>
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-card v-show="searchView">
<!--将新一般处理页添加至通讯服务器-->
@@ -306,11 +308,13 @@ export default {
this.searchTable1()
},
searchTable2(row) {
this.useqrcode(row.采购合同流水号)
this.searchPic() // 显示图片
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
}).then(() => {
$('#contractName').next('td').html(`<img id="img">`)
this.useqrcode(row.采购合同流水号) // 显示二维码
})
}
}
@@ -341,13 +345,7 @@ export default {
}
</style>
<style>
.tableData{
height: 30px;
}
.el-table .adopt{
background: limegreen;
}
.el-table .NotThrough{
background: palevioletred;
.el-form-item {
margin: 0;
}
</style>

View File

@@ -37,7 +37,48 @@
<el-card>
<el-table v-loading="" :data="tableData1" show-summary size="mini" style="max-height: 400px" height="400px" stripe border highlight-current-row @row-click="searchPic">
<el-table-column align="center" label="供应商" min-width="150px">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form id="table" label-position="left" inline class="demo-table-expand">
<el-row>
<el-col :span="8">
<el-form-item label="接收人">
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="接收时间">
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发票号">
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="开户行">
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开票时间">
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column align="center" label="交接状态" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.接收人" type="success" size="small">已接收</el-tag>
<el-tag v-else type="warning" size="small">未接收</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="200px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -87,37 +128,6 @@
{{ scope.row.传送时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="交接状态" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.接收人" type="success" size="small">已接收</el-tag>
<el-tag v-else type="warning" size="small">未接收</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="接收人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="接收时间" min-width="135px">
<template slot-scope="scope">
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" min-width="120px">
<template slot-scope="scope">
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<template slot-scope="scope">
<el-button