Merge branch 'master' of http://192.168.0.112:10010/r/高精2.0
This commit is contained in:
@@ -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].姓名,
|
||||
|
||||
@@ -50,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.实际到货数量 }}
|
||||
@@ -65,25 +75,20 @@
|
||||
{{ 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-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-card>
|
||||
<span>采购合同编号:</span>
|
||||
<el-select v-model="ContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
|
||||
<el-select v-model="ShopContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Contract"
|
||||
v-for="item in ShopContract"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -104,8 +109,7 @@
|
||||
: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="searchPartinfo()">查询</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" @click="searchPartinfo()">导出</el-button>
|
||||
<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
|
||||
@@ -127,11 +131,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.实际到货数量 }}
|
||||
@@ -142,16 +156,11 @@
|
||||
{{ 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-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>
|
||||
@@ -170,7 +179,7 @@
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
height="200"
|
||||
@row-click = "searchDetail()">
|
||||
@row-click = "searchDetail">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -238,7 +247,7 @@
|
||||
</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="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>
|
||||
@@ -265,60 +274,44 @@
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="100">
|
||||
<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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ 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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="130">
|
||||
<el-table-column label="零件图号" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
{{ scope.row.图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="130">
|
||||
<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="130">
|
||||
<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="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="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="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
{{ 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="primary" icon="el-icon-edit" style="margin: 0 0 10px 10px" @click="editListDetailx(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropListdetail(scope.row)">删除</el-button>
|
||||
<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>
|
||||
@@ -379,17 +372,75 @@
|
||||
<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, searchShopInbound, searchInboundCard, addInboundCard, searchAffairPeople, addInboundCardDetail, searchInboundCardDetail } 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: '',
|
||||
@@ -405,6 +456,7 @@ export default {
|
||||
listLoading4: '',
|
||||
tableData4: [],
|
||||
dialogVisible1: false,
|
||||
dialogVisible2: false,
|
||||
People: [],
|
||||
form: {
|
||||
contract: '',
|
||||
@@ -437,7 +489,8 @@ export default {
|
||||
paintGroup: [],
|
||||
numberGroup: [],
|
||||
priceGroup: [],
|
||||
DetailNumber: ''
|
||||
DetailNumber: '',
|
||||
CardDetailNumber: '' // 入库单明细流水号
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -460,6 +513,16 @@ 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({
|
||||
@@ -483,6 +546,11 @@ 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
|
||||
@@ -491,10 +559,10 @@ export default {
|
||||
searchShopinfo() {
|
||||
this.tableData2 = []
|
||||
this.listLoading2 = true
|
||||
searchShopInbound(this.ContractValue, this.InboundDate, this.InventoryValue).then(response => {
|
||||
searchShopInbound(this.ShopContractValue, this.InboundDate, this.InventoryValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
this.listLoading2 = false
|
||||
})
|
||||
},
|
||||
searchInboundCard1() {
|
||||
@@ -539,7 +607,7 @@ export default {
|
||||
this.modelGroup.push(val[i].物料规格)
|
||||
this.specificationGroup.push(val[i].物料型号)
|
||||
this.paintGroup.push(val[i].零件图号)
|
||||
this.numberGroup.push(val[i].数量)
|
||||
this.numberGroup.push(val[i].实际到货数量)
|
||||
this.priceGroup.push(val[i].单价)
|
||||
}
|
||||
},
|
||||
@@ -555,7 +623,7 @@ export default {
|
||||
this.modelGroup.push(val[i].物料规格)
|
||||
this.specificationGroup.push(val[i].物料型号)
|
||||
this.paintGroup.push(val[i].零件图号)
|
||||
this.numberGroup.push(val[i].数量)
|
||||
this.numberGroup.push(val[i].实际到货数量)
|
||||
this.priceGroup.push(val[i].单价)
|
||||
}
|
||||
},
|
||||
@@ -564,16 +632,45 @@ export default {
|
||||
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.请购入库单流水号
|
||||
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: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +315,6 @@ export default {
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.role = this.token
|
||||
console.log(this.role, 321312)
|
||||
this.searchPeopleData()
|
||||
},
|
||||
// 查询仓库
|
||||
|
||||
@@ -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].姓名,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
38
src/views/MarketingCenter/DeliveryManagement/htmlToPdf.js
Normal file
38
src/views/MarketingCenter/DeliveryManagement/htmlToPdf.js
Normal 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')
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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}
|
||||
|
||||
@@ -200,36 +200,41 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-if="false">
|
||||
<el-card>
|
||||
<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-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="230px">
|
||||
<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="220px">
|
||||
<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" width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
{{ scope.row.开票时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收时间" align="center" width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -267,14 +272,74 @@
|
||||
</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="ManufacturerName" >
|
||||
<el-input v-model="form.ManufacturerName" placeholder="厂家名称" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂家简称" prop="ManufacturerAbbreviation">
|
||||
<el-input v-model="form.ManufacturerAbbreviation" placeholder="厂家简称" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="地址" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="roleName">
|
||||
<el-input v-model="form.roleName" placeholder="联系人" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话" prop="phNumber">
|
||||
<el-input v-model="form.phNumber" placeholder="电话" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传真" prop="Fax">
|
||||
<el-input v-model="form.Fax" placeholder="传真" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备情况" prop="EquipmentCondition">
|
||||
<el-input v-model="form.EquipmentCondition" placeholder="设备情况" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="Remarks">
|
||||
<el-input v-model="form.Remarks" placeholder="备注" 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 {
|
||||
title1: '',
|
||||
dialogFormVisible: false,
|
||||
count1: 0,
|
||||
form: {},
|
||||
实际付款时间: '',
|
||||
loading: false,
|
||||
loading2: false,
|
||||
@@ -437,12 +502,123 @@ export default {
|
||||
this.tableData2 = []
|
||||
this.zhongjianbianliang = row.外协加工任务单流水号
|
||||
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
// 点击增加
|
||||
editType1(formName) {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.form.ManufacturerName = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 增加确定
|
||||
editType() {
|
||||
edittype(this.form.ManufacturerNumber, this.form.ManufacturerName, this.form.ManufacturerAbbreviation, this.form.address, this.form.roleName, this.form.phNumber, this.form.Fax, this.form.Remarks, this.form.category, this.form.attention, this.form.EquipmentCondition).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息增加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
this.searchTable()
|
||||
} 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.ManufacturerNumber = row.序号
|
||||
this.form.ManufacturerName = row.外协厂家名称
|
||||
this.form.address = row.地址
|
||||
this.form.roleName = row.联系人
|
||||
this.form.phNumber = row.电话
|
||||
this.form.Fax = row.传真
|
||||
this.form.Remarks = row.备注
|
||||
this.form.category = row.类别
|
||||
this.form.EquipmentCondition = row.设备情况
|
||||
this.form.ManufacturerAbbreviation = row.外协厂家简称
|
||||
this.form.attention = row.关注
|
||||
this.dialogFormVisible = true
|
||||
this.title1 = '编辑'
|
||||
this.CoManufacturerFlowNumber1 = row.外协厂家流水号
|
||||
},
|
||||
// 编辑确定
|
||||
handleChange() {
|
||||
handlechange(this.CoManufacturerFlowNumber1, this.form.ManufacturerNumber, this.form.ManufacturerName, this.form.ManufacturerAbbreviation, this.form.address, this.form.roleName, this.form.phNumber, this.form.Fax, this.form.Remarks, this.form.category, this.form.attention, this.form.EquipmentCondition).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.searchTable()
|
||||
} 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.外协厂家流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('信息删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
@@ -478,9 +654,8 @@ export default {
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-table .fukuan {
|
||||
background: #AEF199;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user