This commit is contained in:
liushuai
2019-04-19 17:51:34 +08:00
12 changed files with 790 additions and 326 deletions

View File

@@ -1,27 +1,27 @@
import request from '@/utils/request'
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}`,
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询分配后的基本件
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_基本件_分配后',
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}`,
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}`,
Pagination: pageCurrent + '&' + pageSize
}
})
@@ -136,14 +136,14 @@ export function outInquirySheet(num1, num2, num3) {
})
}
// 查询物料
export function searchAllMaterial(MaterialName, pageCurrent, pageSize) {
export function searchAllMaterial(check1, MaterialName, check2, MaterialSpec, check3, MaterialModel, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_物料主文件_基本_查询数据_分页',
param: '物料名称_check=1&物料名称=' + MaterialName + '&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
param: `物料名称_check=${check1}&物料名称=${MaterialName}&物料规格_check=${check2}&物料规格=${MaterialSpec}&物料型号_check=${check3}&物料型号=${MaterialModel}&PageCurrent=${pageCurrent}=int&PageSize=${pageSize}=int&PageCount=1=int=output&ItemCount=1=int=output`
}
})
}
@@ -207,3 +207,62 @@ export function cancelUseInventory(...params) {
}
})
}
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据_按时间排序'
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=1&项目流水号=' + num
}
})
}
// 分组查询
export function searchGroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询询价单基础信息维护
export function searchBaseInfo(id) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单基础信息_查询数据',
param: '人员编号=' + id
}
})
}
// 查询询价单基础信息维护
export function editBaseInfo(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_询价单基础信息_增改数据',
param: `人员编号=${params[0]}&手机=${params[1]}&传真=${params[2]}&邮箱=${params[3]}&公司地址=${params[4]}&邮编=${params[5]}&公司电话=${params[6]}&税号=${params[7]}&送货地址=${params[8]}&帐号=${params[9]}&开户行=${params[10]}`
}
})
}

View File

@@ -36,3 +36,15 @@ export function doneContract(...params) {
}
})
}
// 查询询价单基础信息维护
export function searchBaseInfo(id) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_询价单基础信息_查询数据',
param: '人员编号=' + id
}
})
}

View File

@@ -45,6 +45,30 @@ export function initBuyer() {
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=1&项目流水号=' + num
}
})
}
// 分组查询
export function searchGroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询表1标准件和外购件
export function searchTable1(...params) {
return request({
@@ -53,7 +77,7 @@ export function searchTable1(...params) {
data: {
type: '1',
name: '采购管理_采购部采购_查询物料',
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&物料名称_check=${params[8]}&物料名称=${params[9]}&物料状态=${params[10]}&物料规格_check=${params[11]}&物料规格=${params[12]}&物料型号_check=${params[13]}&物料型号=${params[14]}`,
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&机床流水号_check=${params[8]}&机床流水号=${params[9]}&组件流水号_check=${params[10]}&组件流水号=${params[11]}&物料名称_check=${params[12]}&物料名称=${params[13]}&物料状态=${params[14]}&物料规格_check=${params[15]}&物料规格=${params[16]}&物料型号_check=${params[17]}&物料型号=${params[18]}`,
Pagination: params[0] + '&' + params[1]
}
})
@@ -66,7 +90,7 @@ export function searchTable2(...params) {
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_基本件',
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&物料状态=${params[4]}&零件图号_check=${params[5]}&零件图号=${params[6]}&零件名称_check=${params[7]}&零件名称=${params[8]}&规格_check=${params[9]}&规格=${params[10]}&材料_check=${params[11]}&材料=${params[12]}`,
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&机床流水号_check=${params[4]}&机床流水号=${params[5]}&组件流水号_check=${params[6]}&组件流水号=${params[7]}&物料状态=${params[8]}&零件图号_check=${params[9]}&零件图号=${params[10]}&零件名称_check=${params[11]}&零件名称=${params[12]}&规格_check=${params[13]}&规格=${params[14]}&材料_check=${params[15]}&材料=${params[16]}`,
Pagination: params[0] + '&' + params[1]
}
})

View File

@@ -20,7 +20,7 @@ export function addTable(supplierName, businessNature, creationDate, registeredC
data: {
type: '2',
name: '采购管理_供应商_增加数据',
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod + '&output1=1=int=output'
}
})
}

View File

@@ -22,9 +22,6 @@ import 'viewerjs/dist/viewer.css'
import VueBarcode from '@xkeshi/vue-barcode'
Vue.component('barcode', VueBarcode)
Vue.use(curd)
Vue.use(htmlToPdf)
Vue.use(ElementUI)
Vue.use(curd)
Vue.use(htmlToPdf)
Vue.use(ElementUI)

View File

@@ -64,7 +64,6 @@
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
<!-- ° # ± × mm δ μm ()-->
<!--<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="insertThestring()">计算重量</el-button>-->
</el-col>
@@ -150,6 +149,29 @@
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="saveApprove">保存</el-button>
</el-button-group>
</el-row>
<div style="margin-top: 5px;margin-bottom: 10px;display: inline-block"><span>符号</span>
<el-tag type="info"></el-tag>
<el-tag type="info">°</el-tag>
<el-tag type="info">#</el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info">±</el-tag>
<el-tag type="info">×</el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info">mm</el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info">δ</el-tag>
<el-tag type="info">μm</el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info"></el-tag>
<el-tag type="info">()</el-tag>
</div>
<el-table
v-loading="loading0"
:data="tableData"

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;height:40px;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: 1px 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

@@ -2,7 +2,33 @@
<div class="app-container">
<el-tabs type="border-card" @tab-click="searchTable11();searchTable12()">
<el-tab-pane label="标准件和外购件">
<el-row style="margin-bottom: 10px">
<el-row style="margin-bottom: 5px">
<span>项目名称:</span>
<el-select v-model="projectValue" style="width:200px" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="machineValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="groupValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<el-row style="margin-bottom: 5px">
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>物料名称:</span>
@@ -63,16 +89,16 @@
{{ 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="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.物料名称 }}
@@ -143,7 +169,33 @@
</div>
</el-tab-pane>
<el-tab-pane label="基本件">
<el-row style="margin-bottom: 10px">
<el-row style="margin-bottom: 5px">
<span>项目名称:</span>
<el-select v-model="projectValue" style="width:200px" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="machineValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="groupValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<el-row style="margin-bottom: 5px">
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>零件图号:</span>
@@ -278,7 +330,8 @@
style="margin-left: 10px"
@click="addInquirySheet">选入</el-button>
</div>
<h3 style="margin-top: 0">询价单</h3>
<h3 style="margin-top: 0;display:inline-block;width:50%">询价单</h3>
<el-button :loading="baseInfoLoading" type="success" size="mini" style="float: right" @click="inquirySheetBaseInfoMaintain">询价单基础信息维护</el-button>
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="询价单编号" align="center" min-width="150">
<template slot-scope="scope">
@@ -409,6 +462,18 @@
<td colspan="4"/>
<td colspan="3"/>
</tr>
<tr>
<td colspan="14">请速确认后回传合同及具体交货期限,回传:{{ form3.fax }},联系人:{{ form3.contact }}{{ form3.phone }}</td>
</tr>
<tr>
<td colspan="14">邮箱:{{ form3.email }};公司地址:{{ form3.companyAddress }};公司电话:{{ form3.companyPhone }}</td>
</tr>
<tr>
<td colspan="14">税号:{{ form3.taxNumber }};邮编:{{ form3.postCode }};帐号:{{ form3.account }}</td>
</tr>
<tr>
<td colspan="14">开户行:{{ form3.bank }};送货地址:{{ form3.shippingAddress }}</td>
</tr>
</table>
</div>
@@ -548,9 +613,17 @@
</el-dialog>
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
<el-row style="margin-bottom: 10px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
<span>物料规格:</span>
<el-input v-model="materialSpec0" placeholder="物料规格" size="small" clearable/>
</el-row>
<el-row style="margin-bottom: 10px">
<span>物料型号:</span>
<el-input v-model="materialModel0" placeholder="物料型号" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
</el-row>
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
<el-table-column align="center" label="物料名称" min-width="150">
<template slot-scope="scope">
@@ -596,13 +669,82 @@
<el-button :disabled="Number(useNumber)===0" type="primary" size="small" @click="submitUseInventory">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible5" title="询价单基础信息维护" center style="min-height: 300px;" width="620px">
<el-form ref="form3" :model="form3" label-position="right" label-width="70px" class="baseInfo">
<el-row>
<el-col :span="12">
<el-form-item label="联系人">
<el-input v-model="form3.contact" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机">
<el-input v-model="form3.phone" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="传真">
<el-input v-model="form3.fax" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="邮箱">
<el-input v-model="form3.email" size="small"/>
</el-form-item>
</el-col>
</el-row>
<hr>
<el-row>
<el-col :span="12">
<el-form-item label="公司地址">
<el-input v-model="form3.companyAddress" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="邮编">
<el-input v-model="form3.postCode" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公司电话">
<el-input v-model="form3.companyPhone" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="税号">
<el-input v-model="form3.taxNumber" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="送货地址">
<el-input v-model="form3.shippingAddress" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="帐号">
<el-input v-model="form3.account" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行">
<el-input v-model="form3.bank" size="small"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible5=false">取消</el-button>
<el-button type="primary" size="small" @click="submitBaseInfo">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
submitUseInventory } from '@/api/PurchasingCenter/CreateInquirySheet'
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
import { exportExcelMethod } from './exportExcel'
import $ from 'jquery'
@@ -611,6 +753,27 @@ export default {
name: '', // 创建询价单
data() {
return {
baseInfoLoading: false,
dialogVisible5: false,
form3: { // 询价单基础信息表单
contact: '',
phone: '',
fax: '',
email: '',
companyAddress: '',
postCode: '',
companyPhone: '',
taxNumber: '',
shippingAddress: '',
account: '',
bank: ''
},
projectValue: '',
project: [],
machineValue: '',
machine: [],
groupValue: '',
group: [],
partNum: '',
partName: '',
partSpec: '',
@@ -700,6 +863,8 @@ export default {
allNum: [], // 总数量
dialogVisible3: false,
materialName0: '',
materialSpec0: '',
materialModel0: '',
tableData02: [],
total02: 0,
pageCurrent02: 1,
@@ -727,10 +892,88 @@ export default {
])
},
created() {
this.fetchData()
this.searchTable11() // 查表1
this.searchTable2() // 查表2
},
methods: {
// 询价单基础信息维护
inquirySheetBaseInfoMaintain() {
this.baseInfoLoading = true
searchBaseInfo(this.id).then(res => {
this.baseInfoLoading = false
this.form3.contact = res.data[0] ? res.data[0].联系人 : ''
this.form3.phone = res.data[0] ? res.data[0].手机 : ''
this.form3.fax = res.data[0] ? res.data[0].传真 : ''
this.form3.email = res.data[0] ? res.data[0].邮箱 : ''
this.form3.companyAddress = res.data[0] ? res.data[0].公司地址 : ''
this.form3.postCode = res.data[0] ? res.data[0].邮编 : ''
this.form3.companyPhone = res.data[0] ? res.data[0].公司电话 : ''
this.form3.taxNumber = res.data[0] ? res.data[0].税号 : ''
this.form3.shippingAddress = res.data[0] ? res.data[0].送货地址 : ''
this.form3.account = res.data[0] ? res.data[0].帐号 : ''
this.form3.bank = res.data[0] ? res.data[0].开户行 : ''
this.dialogVisible5 = true
})
},
// 提交询价单基础信息维护
submitBaseInfo() {
editBaseInfo(this.id, this.form3.phone, this.form3.fax, this.form3.email, this.form3.companyAddress, this.form3.postCode, this.form3.companyPhone, this.form3.taxNumber, this.form3.shippingAddress, this.form3.account, this.form3.bank).then(res => {
if (res.data[0].result === '1') {
this.dialogVisible5 = false
this.$message.success('操作成功')
} else { this.$message.error('操作失败') }
})
},
fetchData() {
searchBaseInfo(this.id).then(res => {
this.form3.contact = res.data[0] ? res.data[0].联系人 : ''
this.form3.phone = res.data[0] ? res.data[0].手机 : ''
this.form3.fax = res.data[0] ? res.data[0].传真 : ''
this.form3.email = res.data[0] ? res.data[0].邮箱 : ''
this.form3.companyAddress = res.data[0] ? res.data[0].公司地址 : ''
this.form3.postCode = res.data[0] ? res.data[0].邮编 : ''
this.form3.companyPhone = res.data[0] ? res.data[0].公司电话 : ''
this.form3.taxNumber = res.data[0] ? res.data[0].税号 : ''
this.form3.shippingAddress = res.data[0] ? res.data[0].送货地址 : ''
this.form3.account = res.data[0] ? res.data[0].帐号 : ''
this.form3.bank = res.data[0] ? res.data[0].开户行 : ''
})
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
projectChange() {
this.machine = []
this.machineValue = ''
this.group = []
this.groupValue = ''
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
value: response.data[i].机床流水号,
label: response.data[i].机床图号
})
}
})
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
value: response.data[i].组件流水号,
label: response.data[i].组号
})
}
})
},
submitUseInventory() {
submitUseInventory(this.backlogMaterialNum, this.useNumber, this.backlogGroupPartNum, this.id).then(response => {
console.log(response.data)
@@ -792,12 +1035,14 @@ export default {
return row['供货商'] === value
},
searchTable11() { // 查询标准件和外购件列表
let check1, check2, check3
let check1, check2, check3, check4, check5, check6
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
console.log(response.data.rows)
this.projectValue ? check4 = 1 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue).then(response => {
this.tableData11 = response.data.rows
this.total11 = response.data.total
})
@@ -812,12 +1057,14 @@ export default {
this.searchTable11()
},
searchTable12() { // 查询基本件列表
let check1, check2, check3
let check1, check2, check3, check4, check5, check6
this.partNum ? check1 = 1 : check1 = 0
this.partName ? check2 = 1 : check2 = 0
this.partSpec ? check3 = 1 : check3 = 0
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id).then(response => {
console.log(response.data.rows, 9999)
this.projectValue ? check4 = 1 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue).then(response => {
this.tableData12 = response.data.rows
this.total12 = response.data.total
})
@@ -1216,14 +1463,22 @@ export default {
this.materialOldValue = row.物料流水号
},
partChange(row) { // 零件变更 基本件
alert('没有基本件库')
this.$message('没有基本件的标准库')
console.log(row)
},
searchMaterial() {
searchAllMaterial(this.materialName0, this.pageCurrent02, this.pageSize02).then(response => {
this.tableData02 = response.data.result
this.total02 = parseInt(response.data.output[0].ItemCount)
})
if (this.materialName0 || this.materialSpec0 || this.materialModel0) {
let check1, check2, check3
this.materialName0 ? check1 = 1 : check1 = 0
this.materialSpec0 ? check2 = 1 : check2 = 0
this.materialModel0 ? check3 = 1 : check3 = 0
searchAllMaterial(check1, this.materialName0, check2, this.materialSpec0, check3, this.materialModel0, this.pageCurrent02, this.pageSize02).then(response => {
this.tableData02 = response.data.result
this.total02 = parseInt(response.data.output[0].ItemCount)
})
} else {
this.$message.warning('请至少输入一种搜索条件')
}
},
handleSizeChange02(val) {
this.pageSize02 = val
@@ -1258,6 +1513,9 @@ export default {
</script>
<style scoped>
.baseInfo .el-form-item {
margin: 0;
}
.inquirySheet td{
height: 40px;
text-align: center;

View File

@@ -156,16 +156,33 @@
<script>
import Tinymce from '@/components/Tinymce'
import { searchInquirySheet, searchSheetContract, doneContract } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex'
import $ from 'jquery'
import { sleep } from '@/utils/tool'
import $ from 'jquery'
export default {
components: { Tinymce },
inject: ['reload'],
data() {
return {
year: '',
month: '',
day: '',
trustee: '', // 受托人
bank1: '',
account1: '',
taxCode1: '',
phone1: '',
fax1: '',
postCode1: '',
bank2: '',
account2: '',
taxCode2: '',
phone2: '',
fax2: '',
postCode2: '',
hasTax: '未税',
taxRate: 0.16,
preview: false, // 预览
@@ -179,8 +196,7 @@ export default {
supplierName: '', // 供应商名称
supplierValue: '', // 供应商流水号
supplierAddress: '', // 供应商地址
supplierPhone: '', // 供应商电话
supplierFax: '', // 供应商传真
legalPerson: '', // 法人
untaxTotal: '', // 未税合计
tax: '', // 税额
taxTotal: '', // 含税合计
@@ -211,6 +227,14 @@ export default {
},
methods: {
fetchData() {
searchBaseInfo(this.id).then(res => {
this.fax2 = res.data[0] ? res.data[0].传真 : ''
this.postCode2 = '224053'
this.phone2 = res.data[0] ? res.data[0].手机 + '/' + res.data[0].公司电话 : ''
this.taxCode2 = res.data[0] ? res.data[0].税号 : ''
this.account2 = res.data[0] ? res.data[0].帐号 : ''
this.bank2 = res.data[0] ? res.data[0].开户行 : ''
})
searchInquirySheet(0, 0, 0, 0, 1, this.id).then(response => { // 初始化询价单号
for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({
@@ -219,8 +243,14 @@ export default {
supplierName: response.data[i].供应商名称,
supplierValue: response.data[i].供应商流水号,
supplierAddress: response.data[i].地址,
supplierPhone: response.data[i].电话号码,
supplierFax: response.data[i].传真
legalPerson: response.data[i].企业性质, // 法人
trustee: response.data[i].注册资本 || '', // 受托人
bank1: response.data[i].开户行 || '', // 开户行
account1: response.data[i].帐号 || '', // 帐号
taxCode1: response.data[i].税号 || '', // 税号
phone1: response.data[i].电话号码 || '', // 电话
fax1: response.data[i].传真 || '', // 传真
postCode1: response.data[i].货期 || '' // 邮编
})
}
})
@@ -239,9 +269,15 @@ export default {
this.supplierName = this.contractNums[i].supplierName
this.supplierValue = this.contractNums[i].supplierValue
this.supplierAddress = this.contractNums[i].supplierAddress
this.supplierPhone = this.contractNums[i].supplierPhone
this.supplierFax = this.contractNums[i].supplierFax
this.legalPerson = this.contractNums[i].legalPerson
this.contractNum = this.contractNums[i].label
this.trustee = this.contractNums[i].trustee
this.bank1 = this.contractNums[i].bank1
this.account1 = this.contractNums[i].account1
this.taxCode1 = this.contractNums[i].taxCode1
this.phone1 = this.contractNums[i].phone1
this.fax1 = this.contractNums[i].fax1
this.postCode1 = this.contractNums[i].postCode1
}
}
this.searchContractDetail()
@@ -310,79 +346,66 @@ export default {
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 20%;">买方:</td>
<td style="width: 30%;">江苏高精机电装配有限公司</td>
<td style="width: 20%;">卖方:</td>
<td id="supplierName" style="width: 30%;"></td>
<td style="width: 15%;">买方:</td>
<td style="width: 35%;">江苏高精机电装配有限公司</td>
<td style="width: 15%;">卖方:</td>
<td id="supplierName" style="width: 35%;"></td>
</tr>
<tr>
<td style="width: 20%;">地址:</td>
<td style="width: 30%;">盐城市开放大道666号</td>
<td style="width: 20%;">地址:</td>
<td id="supplierAddress" style="width: 30%;"></td>
<td style="width: 15%;">地址:</td>
<td style="width: 35%;">盐城市开放大道666号</td>
<td style="width: 15%;">地址:</td>
<td id="supplierAddress" style="width: 35%;"></td>
</tr>
<tr>
<td style="width: 20%;">法定代表人:</td>
<td style="width: 30%;">徐秀兵</td>
<td style="width: 20%;">法定代表人:</td>
<td style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">电话:</td>
<td style="width: 30%;"></td>
<td style="width: 20%;">电话:</td>
<td id="supplierPhone" style="width: 30%;"></td>
</tr>
<tr>
<td style="width: 20%;">传真:</td>
<td style="width: 30%;"></td>
<td style="width: 20%;">传真:</td>
<td id="supplierFax" style="width: 30%;"></td>
<td style="width: 15%;">法定代表人:</td>
<td style="width: 35%;">徐秀兵</td>
<td style="width: 15%;">法定代表人:</td>
<td id="legalPerson" style="width: 35%;"></td>
</tr>
</tbody>
</table>
<p>根据中华人民共和国合同法及相关法律法规,经买卖双方平等协商,就卖方向买方出售合同项下产品事宜达成一致,签订本合同(明细表及合同通用条款)如下:</p>
<table style="border-collapse: collapse; width: 100%;"
border="1">
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 25%;">合同总额RMB</td>
<td class="actualTotal" style="width: 25%;"></td>
<td style="width: 25%;">大写:</td>
<td id="actualTotal_zh" style="width: 25%;"></td>
<td style="width: 20%;">合同总额RMB</td>
<td class="actualTotal" style="width: 20%;"></td>
<td style="width: 20%;">大写:</td>
<td id="actualTotal_zh" style="width: 40%;"></td>
</tr>
<tr>
<td style="width: 25%;">交货日期</td>
<td id="deliveryDate" style="width: 25%;" colspan="3"></td>
<td style="width: 20%;" rowspan="3">交货地点</td>
<td style="width: 20%;">地址:</td>
<td style="width: 30%;" colspan="2"></td>
</tr>
<tr>
<td style="width: 25%;" rowspan="3">交货地点</td>
<td style="width: 25%;">地址:</td>
<td style="width: 25%;" colspan="2"></td>
<td style="width: 20%;">联系人</td>
<td style="width: 30%;" colspan="2"></td>
</tr>
<tr>
<td style="width: 25%;">联系</td>
<td style="width: 25%;" colspan="2"></td>
<td style="width: 20%;">联系电话</td>
<td style="width: 30%;" colspan="2"></td>
</tr>
<tr>
<td style="width: 25%;">联系电话</td>
<td style="width: 25%;" colspan="2"></td>
<td style="width: 20%;">交货日期</td>
<td id="deliveryDate" style="width: 30%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">开票信息:</td>
<td id="invoiceInfo" style="width: 25%;" colspan="3"></td>
<td style="width: 20%;">开票信息:</td>
<td id="invoiceInfo" style="width: 30%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">支付日期:</td>
<td id="payDate" style="width: 25%;" colspan="3"></td>
<td style="width: 20%;">支付日期:</td>
<td id="payDate" style="width: 30%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">支付方式:</td>
<td id="payMethod" style="width: 25%;" colspan="3"></td>
<td style="width: 20%;">支付方式:</td>
<td id="payMethod" style="width: 30%;" colspan="3"></td>
</tr>
<tr>
<td style="width: 25%;">其他说明:</td>
<td id="otherInfo" style="width: 25%;" colspan="3"></td>
<td style="width: 20%;">其他说明:</td>
<td id="otherInfo" style="width: 30%;" colspan="3"></td>
</tr>
</tbody>
</table>
@@ -390,19 +413,29 @@ export default {
<tbody>
<tr>
<td style="width: 50%;">
<p>买方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<span>卖方:${this.supplierName}(盖章)</span><br>
<span>受托人:${this.trustee}</span><br>
<span>开户行:${this.bank1}</span><br>
<span>账号:${this.account1}</span><br>
<span>税号:${this.taxCode1}</span><br>
<span>电话:${this.phone1}</span><br>
<span>传真:${this.fax1}</span><br>
<span>邮编:${this.postCode1}</span>
</td>
<td style="width: 50%;">
<p>卖方:</p>
<p>(盖章)</p>
<p>授权代表人_______________</p>
<span>买方:江苏高精机电装配有限公司(盖章)</span><br>
<span>受托人:${this.name}</span><br>
<span>开户行:${this.bank2}</span><br>
<span>账号:${this.account2}</span><br>
<span>税号:${this.taxCode2}</span><br>
<span>电话:${this.phone2}</span><br>
<span>传真:${this.fax2}</span><br>
<span>邮编:${this.postCode2}</span>
</td>
</tr>
</tbody>
</table>
<p style="text-align: right;">日期______年______月______日</p>
<p style="text-align: right;">日期_${this.year}_年_${this.month}_月_${this.day}_日</p>
<hr />
<p style="text-align: center;">
<strong>明细表</strong>
@@ -433,6 +466,12 @@ export default {
`
},
async editContract() { // 选择一个询价单,整成合同明细
const date = new Date()
this.year = date.getFullYear()
this.month = date.getMonth() + 1
this.day = date.getDate()
this.demoChange()
await sleep(0)
if (this.contractNumValue) {
if (this.demoRadio) {
this.$refs.tinymce.destroyTinymce()
@@ -440,8 +479,7 @@ export default {
document.getElementById('contractNum') ? document.getElementById('contractNum').innerHTML = this.contractNum : ''
document.getElementById('supplierName') ? document.getElementById('supplierName').innerHTML = this.supplierName : ''
document.getElementById('supplierAddress') ? document.getElementById('supplierAddress').innerHTML = this.supplierAddress : ''
document.getElementById('supplierPhone') ? document.getElementById('supplierPhone').innerHTML = this.supplierPhone : ''
document.getElementById('supplierFax') ? document.getElementById('supplierFax').innerHTML = this.supplierFax : ''
document.getElementById('legalPerson') ? document.getElementById('legalPerson').innerHTML = this.legalPerson : ''
document.getElementById('payDate') ? document.getElementById('payDate').innerHTML = this.payDate : ''
document.getElementById('payMethod') ? document.getElementById('payMethod').innerHTML = this.payMethod : ''
document.getElementById('invoiceInfo') ? document.getElementById('invoiceInfo').innerHTML = this.invoiceInfo : ''

View File

@@ -2,127 +2,134 @@
<div class="app-container">
<el-card>
<el-row>
<!--<span>部门名称:</span>-->
<!--<el-select v-model="DepartmentValue" style="width:200px" placeholder="请选择" size="small" clearable @change="searchMaterialCategory">-->
<!--<el-option-->
<!--v-for="item in Department"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value">-->
<!--</el-option>-->
<!--</el-select>-->
<span>物料类别:</span>
<el-select
v-model="MaterialCategoryValue"
style="width:200px"
placeholder="请选择"
size="small"
clearable
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料品种:</span>
<el-select
v-model="MaterialVarietyValue"
style="width:200px"
placeholder="请选择"
size="small"
clearable
@change="searchMaterial">
<el-option
v-for="item in MaterialVariety"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="warning"
icon="el-icon-refresh"
size="small"
style="margin-left: 15px"
@click="CategoryMaintenance">维护物料类别
</el-button>
</el-row>
<el-row>
<span>物料名称:</span>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable style="margin-top: 15px;width:200px"/>
<span>物料全称:</span>
<el-input
v-model="FullNameOfMaterial"
placeholder="物料全称"
size="small"
clearable
style="margin-top: 15px;width:200px"/>
<span>物料规格:</span>
<el-input
v-model="MaterialSpecification"
placeholder="物料规格"
size="small"
clearable
style="margin-top: 15px;width:200px"/>
<span>物料型号:</span>
<el-input
v-model="MaterialModel"
placeholder="物料型号"
size="small"
clearable
style="margin-top: 15px;width:200px"/>
</el-row>
<el-row>
<span>计算单位:</span>
<el-select
v-model="MeasurementUnitValue"
style="margin-top: 15px;width:200px"
placeholder="请选择"
size="small"
clearable>
<el-option
v-for="item in MeasurementUnit"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料来源:</span>
<el-select
v-model="MaterialSourceValue"
style="margin-top: 15px;width:200px"
placeholder="请选择"
size="small"
clearable>
<el-option
v-for="item in MaterialSource"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 25px">供货商:</span>
<el-input
v-model="supplier"
placeholder="供货商"
size="small"
clearable
style="margin-top: 15px;width:200px"
@dblclick.native="param=0;openSupplier()"/>
<el-button
type="success"
icon="el-icon-search"
size="small"
style="margin-top: 15px;margin-left: 15px"
@click="pageCurrent=1;searchMaterial()">查询
</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
<el-col style="width: 280px">
<span>物料类别:</span>
<el-select
v-model="MaterialCategoryValue"
placeholder="请选择"
size="small"
clearable
style="margin-bottom: 10px;"
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col style="width: 280px">
<span>物料品种:</span>
<el-select
v-model="MaterialVarietyValue"
placeholder="请选择"
size="small"
clearable
style="margin-bottom: 10px;"
@change="searchMaterial">
<el-option
v-for="item in MaterialVariety"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col style="width: 280px">
<span>物料名称:</span>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable style="margin-bottom: 10px;"/>
</el-col>
<el-col style="width: 280px">
<span>物料全称:</span>
<el-input
v-model="FullNameOfMaterial"
placeholder="物料全称"
size="small"
style="margin-bottom: 10px;"
clearable/>
</el-col>
<el-col style="width: 280px">
<span>物料规格:</span>
<el-input
v-model="MaterialSpecification"
placeholder="物料规格"
size="small"
style="margin-bottom: 10px;"
clearable/>
</el-col>
<el-col style="width: 280px">
<span>物料型号:</span>
<el-input
v-model="MaterialModel"
placeholder="物料型号"
size="small"
style="margin-bottom: 10px;"
clearable/>
</el-col>
<el-col style="width: 280px">
<span>计算单位:</span>
<el-select
v-model="MeasurementUnitValue"
placeholder="请选择"
style="margin-bottom: 10px;"
size="small"
clearable>
<el-option
v-for="item in MeasurementUnit"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col style="width: 280px">
<span>物料来源:</span>
<el-select
v-model="MaterialSourceValue"
placeholder="请选择"
style="margin-bottom: 10px;"
size="small"
clearable>
<el-option
v-for="item in MaterialSource"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col style="width: 280px">
<span style="margin-left: 25px">供货商:</span>
<el-input
v-model="supplier"
placeholder="供货商"
size="small"
style="margin-bottom: 10px;"
clearable
@dblclick.native="param=0;openSupplier()"/>
</el-col>
<el-col style="width: 330px">
<el-button
type="success"
icon="el-icon-search"
size="small"
style="margin-left: 10px"
@click="pageCurrent=1;searchMaterial()">查询
</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
<el-button
type="warning"
icon="el-icon-refresh"
size="small"
style="margin-left: 10px"
@click="CategoryMaintenance">维护物料类别
</el-button>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top: 15px">
<el-table
:data="tableData"
style="width: 100%"
height="440"
style="width: 100%;min-height: 500px"
height="500"
size="mini"
highlight-current-row
border>
@@ -311,7 +318,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="常用符号">
Φ ×
Φ × μ δ ±
</el-form-item>
</el-col>
</el-row>
@@ -424,7 +431,6 @@
</el-card>
</div>
</el-dialog>
</div>
</template>
@@ -765,4 +771,10 @@ export default {
span {
margin: 10px 0px 10px 10px;
}
.el-select{
width:190px
}
.el-input{
width:190px
}
</style>

View File

@@ -4,22 +4,28 @@
<el-tab-pane label="标准件和外购件">
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>机床图号:</span>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
<div style="float:right;padding-top:10px;">
<div style="float:right;">
<span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
@@ -30,6 +36,32 @@
</el-select>
</div>
</el-row>
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</span>
<el-select v-model="groupValue" placeholder="组号" size="small" filterable clearable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<div style="float:right;padding-top:10px;">
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn1">退回</el-button>
</div>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">物料类别:</span>
<el-select
@@ -56,20 +88,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<div style="float:right;">
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn1">退回</el-button>
</div>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">物料名称:</span>
@@ -177,22 +195,28 @@
<el-tab-pane label="基本件">
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>机床图号:</span>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
<el-option
v-for="item in machine"
: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="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()">查询</el-button>
<div style="float:right;padding-top: 10px">
<div style="float:right">
<span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
@@ -203,12 +227,18 @@
</el-select>
</div>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">零件图:</span>
<el-input v-model="partNum" placeholder="零件图号" size="small" clearable/>
<span>零件名称:</span>
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
<div style="float:right;">
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</span>
<el-select v-model="groupValue" placeholder="号" size="small" filterable clearable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<div style="float:right;padding-top: 10px">
<el-button
type="primary"
size="small"
@@ -223,6 +253,12 @@
@click="executeReturn2">退回</el-button>
</div>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">零件图号:</span>
<el-input v-model="partNum" placeholder="零件图号" size="small" clearable/>
<span>零件名称:</span>
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">零件规格:</span>
<el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/>
@@ -324,7 +360,7 @@
</template>
<script>
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchTable1, searchTable2, allocateTask1, allocateTask2, executeReturn1, executeReturn2 } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchMachine, searchGroup, searchTable1, searchTable2, allocateTask1, allocateTask2, executeReturn1, executeReturn2 } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { mapGetters } from 'vuex'
export default {
@@ -343,6 +379,10 @@ export default {
MaterialVariety: [], // 物料品种数组
projectValue: '',
project: [],
machineValue: '',
machine: [],
groupValue: '',
group: [],
materialName: '',
materialStatusValue: [0], // 物料状态
materialStatus: [
@@ -424,6 +464,32 @@ export default {
})
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
},
projectChange() {
this.machine = []
this.machineValue = ''
this.group = []
this.groupValue = ''
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
value: response.data[i].机床流水号,
label: response.data[i].机床图号
})
}
})
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
value: response.data[i].组件流水号,
label: response.data[i].组号
})
}
})
},
searchMaterialVariety() { // 初始化物料品种
this.MaterialVariety = []
this.MaterialVarietyValue = ''
@@ -433,23 +499,27 @@ export default {
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0
let check0, check1, check2, check3
this.machineValue ? check0 = 1 : check0 = 0
this.groupValue ? check1 = 1 : check1 = 0
this.materialName ? this.check4 = 1 : this.check4 = 0
let check2, check3
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel).then(response => {
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2() { // 查询基本件
this.projectValue ? this.check3 = 1 : this.check3 = 0
let check1, check2, check3, check4
let check1, check2, check3, check4, check5, check6
this.partNum ? check1 = 1 : check1 = 0
this.partName ? check2 = 1 : check2 = 0
this.partSpec ? check3 = 1 : check3 = 0
this.partMaterial ? check4 = 1 : check4 = 0
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
this.tableData2 = response.data.rows
console.log(response.data.rows)
this.total2 = response.data.total

View File

@@ -1,73 +1,64 @@
<template>
<div class="app-container">
<el-card>
<el-form ref="form1" :model="form1" label-position="right" label-width="110px" class="searchForm">
<el-form ref="form1" :model="form1" label-position="right" label-width="70px" class="searchForm">
<el-row>
<el-col style="width: 300px">
<el-form-item label="供应商名称">
<el-col style="width: 250px">
<el-form-item label="供应商">
<el-input v-model="supplierName" placeholder="供应商名称" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="企业性质">
<el-input v-model="businessNature" placeholder="企业性质" size="small" clearable/>
<el-col style="width: 250px">
<el-form-item label="法人">
<el-input v-model="businessNature" placeholder="法人" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="创立日期">
<el-date-picker v-model="creationDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
<el-col style="width: 250px">
<el-form-item label="受托人">
<el-input v-model="registeredCapital" placeholder="受托人" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-form-item label="注册资本">
<el-input v-model="registeredCapital" placeholder="注册资本" size="small" clearable/>
<el-col style="width: 250px">
<el-form-item label="邮编">
<el-input v-model="deliveryPeriod" placeholder="邮编" size="small" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="税号">
<el-input v-model="taxNumber" placeholder="税号" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="电子信箱">
<el-input v-model="email" placeholder="电子信箱" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="电话号码">
<el-input v-model="telephone" placeholder="电话号码" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="开户行">
<el-input v-model="bank" placeholder="开户行" size="small" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="帐号">
<el-input v-model="account" placeholder="帐号" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="地址">
<el-input v-model="address" placeholder="地址" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px">
<el-col style="width: 250px">
<el-form-item label="传真">
<el-input v-model="fax" placeholder="传真" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 350px">
<el-form-item label="货期">
<el-input v-model="deliveryPeriod" placeholder="货期" size="small" clearable/>
</el-form-item>
</el-col>
<el-col style="width: 300px;margin-top:2px">
<el-col style="width: 250px;margin:2px 0 0 15px">
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent = 1;fetchData()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">增加</el-button>
</el-col>
@@ -78,22 +69,22 @@
<el-card>
<div style="display: inline-block;margin-bottom: 20px">供应商列表</div>
<el-table :data="List" highlight-current-row border style="width: 100%;max-height: 600px;" height="600" size="mini" @row-click="rowClick">
<el-table-column label="供应商名称" align="center" min-width="350">
<el-table-column label="供应商名称" align="center" fixed="left" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="主要产品" align="center" min-width="350">
<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" width="250">
<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" width="170">
<el-table-column label="帐号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.帐号 }}
</template>
@@ -113,39 +104,34 @@
{{ scope.row.电子信箱 }}
</template>
</el-table-column>
<el-table-column label="地址" align="center" min-width="100">
<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" width="100">
<el-table-column label="传真" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="企业性质" align="center" min-width="100">
<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="100">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
</template>
</el-table-column>
<el-table-column label="注册资本" align="center" min-width="100">
<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">
<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" fixed="right" width="200">
<el-table-column label="操作" align="center" fixed="right" width="190">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@@ -212,7 +198,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质" prop="企业性质">
<el-form-item label="法人" prop="企业性质">
<el-input
v-model="form.企业性质"
size="small"
@@ -223,18 +209,16 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="创立日期" prop="创立日期">
<el-date-picker
v-model="form.创立日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
<el-form-item label="邮编" prop="期">
<el-input
v-model="form.期"
size="small"
type="date"
placeholder="选择日期"/>
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注册资本" prop="注册资本">
<el-form-item label="受托人" prop="注册资本">
<el-input
v-model="form.注册资本"
size="small"
@@ -313,15 +297,6 @@
clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="货期" prop="货期">
<el-input
v-model="form.货期"
size="small"
style="width: 200px;"
clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -449,11 +424,6 @@ export default {
this.fax ? this.check11 = 1 : this.check11 = 0
this.deliveryPeriod ? this.check12 = 1 : this.check12 = 0
searchData(this.check1, this.supplierName, this.check2, this.businessNature, this.check3, this.creationDate, this.check4, this.registeredCapital, this.check5, this.taxNumber, this.check6, this.bank, this.check7, this.account, this.check8, this.email, this.check9, this.address, this.check10, this.telephone, this.check11, this.fax, this.check12, this.deliveryPeriod, this.pageCurrent, this.pageSize).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].创立日期 !== null) {
response.data.rows[j].创立日期 = response.data.rows[j].创立日期.substring(0, response.data.rows[j].创立日期.indexOf(' '))
}
}
this.List = response.data.rows
this.total = response.data.total
})
@@ -482,7 +452,9 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
addTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.form.电话号码, this.form.传真, this.form.货期).then(response => {
if (response.data[0].result === '1') {
if (Number(response.data.output[0].output1) === 0) {
this.$message.warning('该供应商已存在')
} else if (response.data.result[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible = false
this.pageCurrent = 1
@@ -672,7 +644,7 @@ export default {
width:200px
}
.el-input{
width:200px
width:170px
}
span{
margin: 10px 0 10px 10px;