打印
@@ -131,6 +151,17 @@
+
+
+
+
+
+
+
+
+
+
+
-
+
未到货
已到货
@@ -312,6 +343,35 @@ export default {
name: '', // 采购计划
data() {
return {
+ dateRange: '',
+ checktime: '',
+ pickerOptions: {
+ shortcuts: [{
+ text: '上季度',
+ onClick(picker) {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
+ picker.$emit('pick', [start, end])
+ }
+ }, {
+ text: '过去半年',
+ onClick(picker) {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
+ picker.$emit('pick', [start, end])
+ }
+ }, {
+ text: '过去一年',
+ onClick(picker) {
+ const end = new Date()
+ const start = new Date()
+ start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
+ picker.$emit('pick', [start, end])
+ }
+ }]
+ },
RawMaterialGroup: [],
RawMaterialName: '',
tableData: [],
@@ -392,6 +452,7 @@ export default {
Remarks: [], // 备注组
tableData4: [], // 合同模板
采购计划状态: '',
+ 采购计划状态2: '',
paramRow: '' // 参数row
}
},
@@ -406,7 +467,7 @@ export default {
created() {
this.searchRawMaterial()
this.searchTable1()
- this.searchTable2()
+ // this.searchTable2()
},
methods: {
// 获取原材料
@@ -525,9 +586,10 @@ export default {
searchTable2() { // 查询采购单列表
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
- searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, 0, 0, this.check4, this.supplierName0).then(response => {
- this.tableData2 = response.data.rows
- this.total2 = response.data.total
+ this.dateRange ? this.checktime = 1 : (this.checktime = 0, this.dateRange = '')
+ searchPurchaseOrder(this.check3, this.purchasingOrder, 0, 0, this.check4, this.supplierName0, this.checktime, this.dateRange[0], this.dateRange[1]).then(response => {
+ this.tableData2 = response.data
+ // this.total2 = response.data.total
})
},
handleSizeChange2(val) { // 采购单列表分页
@@ -614,6 +676,34 @@ export default {
})
})
},
+ formatJson(filterVal, jsonData) {
+ return jsonData.map(v => filterVal.map(j => {
+ return v[j]
+ }))
+ },
+ exportExcel2(row) {
+ this.searchTable3(row).then(val => {
+ console.log(val)
+ console.log(this.tableData4)
+ if (this.tableData4.length !== 0) {
+ import('@/vendor/Export2Excel').then(excel => {
+ const tHeader = ['备料状态', '物料编码', '零件名称', '材料', '数量', '成品尺寸', '单位', '备注']
+ const filterVal = ['备料状态', '物料零件编码', '零件名称', '材料', '采购数量', '成品尺寸', '备注1']
+ const list = this.tableData4
+ const data = this.formatJson(filterVal, list)
+ excel.export_json_to_excel({
+ header: tHeader,
+ data,
+ filename: '详情',
+ autoWidth: true,
+ bookType: 'xlsx'
+ })
+ })
+ } else {
+ this.$message.warning('没有导出内容')
+ }
+ })
+ },
searchTable3(row) { // 查询采购计划明细
this.purchasingOrderNumber = row.采购计划流水号
this.采购单名称 = row.采购单名称
@@ -627,8 +717,8 @@ export default {
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data
- console.log(response.data)
})
+ return Promise.resolve(/* 这里是需要返回的数据*/)
},
addMateriel() { // 将材料选入请购单
if (!this.purchasingOrderNumber) {
diff --git a/src/views/WorkshopProcurement/NewArrivalList/index.vue b/src/views/WorkshopProcurement/NewArrivalList/index.vue
index ee6a0ea8..a8dbc081 100644
--- a/src/views/WorkshopProcurement/NewArrivalList/index.vue
+++ b/src/views/WorkshopProcurement/NewArrivalList/index.vue
@@ -83,6 +83,7 @@
到货单明细
+ 导出
- 时间段:
+ 时间段:
+
{
+ this.dateRange ? this.check4 = 1 : (this.check4 = 0, this.dateRange = '')
+ // this.startTime && this.endTime ? this.check4 = 1 : this.check4 = 0
+ searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.supplierName0, this.check3, this.gongyingshangValue, this.check4, this.dateRange[0], this.dateRange[1]).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
response.data.rows[j].开票金额 = parseInt(response.data.rows[j].开票金额 * 100) / 100
if (response.data.rows[j].开票时间 !== null) {
diff --git a/src/views/WorkshopProcurement/RequestOutsourcingMaterials/index.vue b/src/views/WorkshopProcurement/RequestOutsourcingMaterials/index.vue
index 59bc807a..58c26498 100644
--- a/src/views/WorkshopProcurement/RequestOutsourcingMaterials/index.vue
+++ b/src/views/WorkshopProcurement/RequestOutsourcingMaterials/index.vue
@@ -1,35 +1,59 @@
- 请款时间段:
-
- 供应商:
-
-
-
+ 请款时间段:
+ 查询
-
-
- 请款
-
+ type="daterange"
+ align="center"
+ style="width: 300px;margin: 3px 0"
+ value-format="yyyy-MM-dd"
+ format="yyyy-MM-dd"
+ range-separator="~"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"/>
+ 供应商:
+
+
+ 查询
+
+
+ 请款
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+ highlight-current-row
+ @row-click="searchTable02">
+
{{ scope.row.供应商名称 }}
-
+
{{ scope.row.请款时间 | formatTime }}
-
+
{{ scope.row.姓名 }}
-
+
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
-
-
-
- 未审批
- 已通过
- 不通过
-
-
-
-
- {{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
-
-
-
-
- 未操作
- 已同意
- 不同意
-
-
-
-
- {{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
-
-
+
+
+ 未审批
+ 已通过
+ 不通过
+
-
+
+
+ {{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
+
+
+
+
+ 未操作
+ 已同意
+ 不同意
+
+
+
+
+ {{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
+
+
+
@@ -133,7 +133,28 @@
@current-change="handleCurrentChange1"/>
-
+
+
+
+
+
供应商:
@@ -317,23 +338,25 @@ export default {
}
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
- if (this.a === 1) {
- this.expands.push(row.采购计划请款流水号)
- this.b = row.采购计划请款流水号
- this.a = 0
- } else {
- if (this.b === row.采购计划请款流水号) {
- this.expands = []
- this.a = 1
- } else {
- this.expands = []
- this.expands.push(row.采购计划请款流水号)
- this.a = 0
- this.b = row.采购计划请款流水号
- }
- }
+ console.log(row, 1111)
+ // if (this.a === 1) {
+ // this.expands.push(row.采购计划请款流水号)
+ // this.b = row.采购计划请款流水号
+ // this.a = 0
+ // } else {
+ // if (this.b === row.采购计划请款流水号) {
+ // this.expands = []
+ // this.a = 1
+ // } else {
+ // this.expands = []
+ // this.expands.push(row.采购计划请款流水号)
+ // this.a = 0
+ // this.b = row.采购计划请款流水号
+ // }
+ // }
searchRequsetFundDetail(row.采购计划请款流水号).then(response => {
this.gridData = response.data
+ console.log(response.data, 2222)
})
},
getRowKeys(row) {