|
@@ -441,318 +441,11 @@
|
|
|
this.deptBudgetList.positionId = this.binnumberList[i].id
|
|
|
}
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
- }
|
|
|
-
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- //合计
|
|
|
- getSummaries(param) {
|
|
|
- const {
|
|
|
- columns,
|
|
|
- data
|
|
|
- } = param
|
|
|
- const sums = []
|
|
|
- columns.forEach((column, index) => {
|
|
|
- if (index === 0) {
|
|
|
- sums[index] = '合计'
|
|
|
- } else if (
|
|
|
- index === 4 ||
|
|
|
- index === 5 ||
|
|
|
- index === 6 ||
|
|
|
- index === 7 ||
|
|
|
- index === 8 ||
|
|
|
- index === 9
|
|
|
- ) {
|
|
|
- const values = data.map((item) => Number(item[column.property]))
|
|
|
- if (!values.every((value) => isNaN(value))) {
|
|
|
- sums[index] = values.reduce((prev, curr) => {
|
|
|
- const value = Number(curr)
|
|
|
- if (!isNaN(value)) {
|
|
|
- return prev + curr
|
|
|
- } else {
|
|
|
- return prev
|
|
|
- }
|
|
|
- }, 0)
|
|
|
- sums[index] = sums[index].toFixed(3)
|
|
|
- }
|
|
|
- } else {
|
|
|
- sums[index] = '--'
|
|
|
- }
|
|
|
- })
|
|
|
- return sums
|
|
|
- },
|
|
|
- getPassYearFormatDate() {
|
|
|
- var nowDate = new Date()
|
|
|
- nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
|
|
|
- var seperator1 = '-'
|
|
|
- var year = nowDate.getFullYear()
|
|
|
- var month = nowDate.getMonth() + 1
|
|
|
- var strDate = nowDate.getDate()
|
|
|
- if (month >= 1 && month <= 9) {
|
|
|
- month = '0' + month
|
|
|
- }
|
|
|
- if (strDate >= 0 && strDate <= 9) {
|
|
|
- strDate = '0' + strDate
|
|
|
- }
|
|
|
- var formatDate = year + seperator1 + month + seperator1 + strDate
|
|
|
- this.getNowFormatDate(formatDate)
|
|
|
- },
|
|
|
- /* 获取现在时间,并接受过去时间的值 */
|
|
|
- getNowFormatDate(formatDate) {
|
|
|
- var date = new Date()
|
|
|
- date.setTime(date.getTime() + 24 * 60 * 60 * 1000)
|
|
|
- var seperator1 = '-'
|
|
|
- var year = date.getFullYear()
|
|
|
- var month = date.getMonth() + 1
|
|
|
- var strDate = date.getDate()
|
|
|
- if (month >= 1 && month <= 9) {
|
|
|
- month = '0' + month
|
|
|
- }
|
|
|
- if (strDate >= 0 && strDate <= 9) {
|
|
|
- strDate = '0' + strDate
|
|
|
- }
|
|
|
- var nowData = year + seperator1 + month + seperator1 + strDate
|
|
|
- this.value2 = [formatDate, nowData] // 默认赋值一年时间
|
|
|
- },
|
|
|
- print(row) {
|
|
|
- sessionStorage.removeItem('record_print')
|
|
|
- getPrintInfo({
|
|
|
- id: row.id
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- localStorage.setItem('ck_bd_printData', JSON.stringify(response))
|
|
|
- window.open('../../../../static/weightCheckInOut.html?type=2')
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
- //返回按钮
|
|
|
- returnWarehouse() {
|
|
|
- this.$router.push({
|
|
|
- path: 'warehouseManagementList'
|
|
|
- })
|
|
|
- this.searchKeyWord = ''
|
|
|
- },
|
|
|
- //
|
|
|
- iossrecord() {
|
|
|
- this.$router.push({
|
|
|
- path: 'warehouseManagementIossRecord',
|
|
|
- query: {
|
|
|
- baseId: this.deptBudgetList.baseId,
|
|
|
- positionId: this.deptBudgetList.positionId,
|
|
|
- warehouseName: this.deptBudgetList.warehouseName,
|
|
|
- binNumber: this.binNumber,
|
|
|
- },
|
|
|
- })
|
|
|
- },
|
|
|
- dateFormat(fmt, date) {
|
|
|
- let ret
|
|
|
- const opt = {
|
|
|
- 'Y+': date.getFullYear().toString(), // 年
|
|
|
- 'm+': (date.getMonth() + 1).toString(), // 月
|
|
|
- 'd+': date.getDate().toString(), // 日
|
|
|
- 'H+': date.getHours().toString(), // 时
|
|
|
- // "M+": date.getMinutes().toString(), // 分
|
|
|
- // "S+": date.getSeconds().toString() // 秒
|
|
|
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
|
|
|
- }
|
|
|
- for (let k in opt) {
|
|
|
- ret = new RegExp('(' + k + ')').exec(fmt)
|
|
|
- if (ret) {
|
|
|
- fmt = fmt.replace(
|
|
|
- ret[1],
|
|
|
- ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
- return fmt
|
|
|
- },
|
|
|
- datechange() {
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- find() {
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- handleClose() {
|
|
|
- this.accessoryTFs = false
|
|
|
- },
|
|
|
- handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`)
|
|
|
- this.pageSize = val
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.currentPage = val
|
|
|
- console.log(`当前页: ${val}`)
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- record(status, status1) {
|
|
|
- this.status = status1
|
|
|
- this.searchType = status
|
|
|
- this.currentPage = '1'
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 上传附件
|
|
|
- uploadSuccess(data, files, url) {
|
|
|
- console.log(data, files, url)
|
|
|
-
|
|
|
- // this.deptBudgetList.
|
|
|
- // this.formData.append('files', files)
|
|
|
- // this.feedbackObj.uploadNameAttachment = data.appendixName
|
|
|
- // this.feedbackObj.pathUploadAttachment = data.appendixPath
|
|
|
- // // this.newAppendixs = files
|
|
|
- // this.onChangeFlag = true
|
|
|
- },
|
|
|
- getList() {
|
|
|
- var startDate = ''
|
|
|
- var endDate = ''
|
|
|
- if (this.value2) {
|
|
|
- startDate = this.value2[0] ? this.value2[0] : ''
|
|
|
- endDate = this.value2[1] ? this.value2[1] : ''
|
|
|
- }
|
|
|
- if (this.warehouseType == 1) {
|
|
|
- getbinnumber({
|
|
|
- id: this.deptBudgetList.baseId
|
|
|
- }).toPromise()
|
|
|
- .then((response) => {
|
|
|
-
|
|
|
- this.binnumberList = response.warehousePositionInfoList
|
|
|
- })
|
|
|
- addselectinfoList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- baseId: this.deptBudgetList.baseId,
|
|
|
- positionId: this.deptBudgetList.positionId,
|
|
|
- warehouseName: this.deptBudgetList.warehouseName,
|
|
|
- startDate: startDate,
|
|
|
- endDate: endDate,
|
|
|
- searchType: this.searchType,
|
|
|
- searchKeyWord: this.searchKeyWord,
|
|
|
- currentPage: this.currentPage,
|
|
|
- pcFlag: this.pcFlag,
|
|
|
- pageSize: this.pageSize
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- for (var i = 0; i < response.records.length; i++) {
|
|
|
- if (response.records[i].addressUrl != null) {
|
|
|
- response.records[i].addressUrlArray = response.records[
|
|
|
- i
|
|
|
- ].addressUrl.split(',')
|
|
|
- } else {
|
|
|
- response.records[i].addressUrlArray = []
|
|
|
- }
|
|
|
- }
|
|
|
- this.deptCircularPage.currentPage = response.current
|
|
|
- this.deptCircularPage.pageSize = response.size
|
|
|
- this.deptBudgetTotal = response.total
|
|
|
- this.warehouseList = response
|
|
|
- })
|
|
|
- } else if (this.warehouseType == 2) {
|
|
|
- recordss({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- baseId: this.deptBudgetList.baseId,
|
|
|
- positionId: this.deptBudgetList.positionId,
|
|
|
- warehouseName: this.deptBudgetList.warehouseName,
|
|
|
- startDate: startDate,
|
|
|
- endDate: endDate,
|
|
|
- searchType: this.searchType,
|
|
|
- searchKeyWord: this.searchKeyWord,
|
|
|
- currentPage: this.currentPage,
|
|
|
- pageSize: this.pageSize,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- for (var i = 0; i < response.records.length; i++) {
|
|
|
- if (response.records[i].addressUrl != null) {
|
|
|
- response.records[i].addressUrlArray = response.records[
|
|
|
- i
|
|
|
- ].addressUrl.split(',')
|
|
|
- } else {
|
|
|
- response.records[i].addressUrlArray = []
|
|
|
- }
|
|
|
- }
|
|
|
- this.deptCircularPage.currentPage = response.current
|
|
|
- this.deptCircularPage.pageSize = response.size
|
|
|
- this.deptBudgetTotal = response.total
|
|
|
- this.warehouseList = response
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- selecttaskType(e) {
|
|
|
- for (var i = 0; i < this.taskTypeList.length; i++) {
|
|
|
- if (this.taskTypeList[i].value == e) {
|
|
|
- this.searchType = this.taskTypeList[i].type
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- fujian(row) {
|
|
|
- if (
|
|
|
- row.addressUrl === null ||
|
|
|
- row.addressUrl === ''
|
|
|
- ) {
|
|
|
- EventBus.$emit(
|
|
|
- 'warning',
|
|
|
- this.$t('system.noticeCircular.NoInformation')
|
|
|
- )
|
|
|
- } else {
|
|
|
- this.accessoryTFs = true
|
|
|
- }
|
|
|
- this.appendixIdss = row.addressUrl
|
|
|
- this.srcList = [row.addressUrl]
|
|
|
- },
|
|
|
- // 关闭 dialog时 处理文件url 初始化upload组件
|
|
|
- handleCloe() {
|
|
|
- this.dialogViewSpareMoney = false
|
|
|
- },
|
|
|
- history(row) {
|
|
|
- console.log(row)
|
|
|
- billoperatehis({
|
|
|
- id: row.id
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.historyList = response
|
|
|
- })
|
|
|
- },
|
|
|
- // async exportlist() {
|
|
|
- // const { data } = await export1(
|
|
|
- // {
|
|
|
- // compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- // contractType: this.contractType,
|
|
|
- // currentPage: this.currentPage,
|
|
|
- // pageSize: this.pageSize,
|
|
|
- // searchType: this.searchType,
|
|
|
- // searchKeyWord: this.searchKeyWord,
|
|
|
- // startDate: this.startDate,
|
|
|
- // endDate: this.endDate,
|
|
|
- // },
|
|
|
- // {},
|
|
|
- // { responseType: 'blob' }
|
|
|
- // ).toPromise()
|
|
|
- // downloadFile({
|
|
|
- // res: data,
|
|
|
- // fileName: `${
|
|
|
- // this.date.year + (this.date.month ? `-${this.date.month}` : '')
|
|
|
- // }_采购合同`,
|
|
|
- // type: 'xls',
|
|
|
- // })
|
|
|
- // },
|
|
|
- // deletecontract(){},
|
|
|
- //删除
|
|
|
-
|
|
|
- approve() {},
|
|
|
- listQuery() {},
|
|
|
- total() {},
|
|
|
- clearfiltQuery() {},
|
|
|
- selectCrtDuty() {},
|
|
|
- },
|
|
|
- }
|
|
|
-=======
|
|
|
+
|
|
|
var formatDate = year + seperator1 + month + seperator1 + strDate
|
|
|
this.getNowFormatDate(formatDate)
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
/* 获取现在时间,并接受过去时间的值 */
|
|
|
getNowFormatDate (formatDate) {
|
|
|
var date = new Date()
|
|
@@ -1002,7 +695,6 @@
|
|
|
selectCrtDuty() {},
|
|
|
},
|
|
|
}
|
|
|
->>>>>>> remotes/origin/rukuguanli
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
/deep/.totalStorage .el-input__inner {
|