a
This commit is contained in:
@@ -233,7 +233,7 @@
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddArrivalOrder">确定</el-button>
|
||||
@click="submitAddArrivalOrder">保存</el-button>
|
||||
<el-button
|
||||
v-show="title==='编辑到货单'"
|
||||
type="primary"
|
||||
@@ -252,12 +252,12 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="数量" prop="数量">
|
||||
<el-input-number v-model="form1.数量" :precision="2" :step="1" size="medium" @change="Calculation"/>
|
||||
<el-input-number v-model="form1.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="单价" prop="单价">
|
||||
<el-input-number v-model="form1.单价" :precision="2" :step="1" size="medium" @change="Calculation"/>
|
||||
<el-input-number v-model="form1.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@@ -277,7 +277,14 @@
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddArrivalOrderMX">确定</el-button>
|
||||
@click="submitAddArrivalOrderMX">保存</el-button>
|
||||
<el-button
|
||||
v-show="title1==='添加到货明细'"
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddArrivalOrderMX1">继续添加</el-button>
|
||||
<el-button
|
||||
v-show="title1==='编辑到货明细'"
|
||||
type="primary"
|
||||
@@ -726,6 +733,23 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAddArrivalOrderMX1() {
|
||||
this.form1.金额 = this.form1.数量 * this.form1.单价
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
AddArrivalOrderMX(this.ArrivalOrderNumber, this.form1.材料, this.form1.数量, this.form1.单位, this.form1.单价, this.form1.金额).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新增到货材料成功')
|
||||
searchTable5(this.ArrivalOrderNumber).then(response => {
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
} else { this.$message.error('新建到货单失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
editArrivalMX(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span v-show="false">发票号:</span>
|
||||
<el-input v-show="false" v-model="invoiceNum" placeholder="发票号" size="small" style="margin: 3px 0;width: 130px" clearable/>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" placeholder="发票号" size="small" style="margin: 3px 0;width: 180px" clearable/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-show="false" v-model="supplierName0" placeholder="供应商" size="small" style="width:130px" clearable/>
|
||||
<el-input v-show="false" v-model="supplierName0" placeholder="供应商" size="small" style="width:130px" clearable @focus="fetchData"/>
|
||||
<el-select v-model="gongyingshangValue" placeholder="供应商" style="width: 180px" size="small" filterable clearable @change="searchTable1">
|
||||
<el-option
|
||||
v-for="item in gongyingshang"
|
||||
@@ -13,16 +13,18 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span class="demonstration">时间段:</span>
|
||||
<span v-show="false" class="demonstration">时间段:</span>
|
||||
<el-date-picker
|
||||
v-show="false"
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 180px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<span v-show="false" class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-show="false"
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
@@ -30,18 +32,10 @@
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-tooltip>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">新增发票</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>
|
||||
</el-row>
|
||||
<!--<el-row style="margin-top: 5px">-->
|
||||
<!--</el-row>-->
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -120,7 +114,7 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="250px">
|
||||
<el-table-column align="center" label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="关联到货单" placement="top">
|
||||
<div style="display: inline-block">
|
||||
@@ -132,6 +126,7 @@
|
||||
@click="aboutArrival(scope.row)">关联到货单</el-button>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel(scope.row)">导出</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button
|
||||
@@ -548,22 +543,9 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
downloadExcel() {
|
||||
if (!this.startTime) {
|
||||
this.$message.error('请选择开始日期')
|
||||
} else if (!this.endTime) {
|
||||
this.$message.error('请选择结束日期')
|
||||
} else if (!this.gongyingshangValue) {
|
||||
this.$message.error('请选择供应商')
|
||||
} else {
|
||||
for (let i = 0; i < this.gongyingshang.length; i++) {
|
||||
if (this.gongyingshang[i].value === this.gongyingshangValue) {
|
||||
var name = this.gongyingshang[i].label
|
||||
}
|
||||
}
|
||||
const _ExcelDownLoad = ExcelDownLoad
|
||||
this.download(`${_ExcelDownLoad}?startTime=${this.startTime}&endTime=${this.endTime}&Gongyingshang=${this.gongyingshangValue}&name=${name}`)
|
||||
}
|
||||
downloadExcel(row) {
|
||||
const _ExcelDownLoad = ExcelDownLoad
|
||||
this.download(`${_ExcelDownLoad}?Fapiao=${row.发票流水号}&name=${row.供应商名称}`)
|
||||
},
|
||||
/**
|
||||
* 下载
|
||||
|
||||
Reference in New Issue
Block a user