From fcab3ed57a555a4d07b4f8b6643c30b78254b5c1 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期五, 27 十月 2023 14:34:09 +0800
Subject: [PATCH] modified: src/views/technology/document/document-form.vue
---
src/views/basic/part/index.vue | 98 +++++++++++++++++++++++++++++++++++--------------
1 files changed, 70 insertions(+), 28 deletions(-)
diff --git a/src/views/basic/part/index.vue b/src/views/basic/part/index.vue
index 576a443..1e00afc 100644
--- a/src/views/basic/part/index.vue
+++ b/src/views/basic/part/index.vue
@@ -1,30 +1,29 @@
<template>
<div class="mod-config">
<basic-container>
- <ttable
- :table="table"
- @handleSelectionChange="handleSelectionChange"
- :uploadInfo="uploadInfo"
- :isShowHide="true"
- :prelang="prelang"
- :options="options"
- :bottomOffset="125"
- :ajaxFun="ajaxFun"
- ref="partTable"
- >
+ <ttable :table="table" @handleSelectionChange="handleSelectionChange" :uploadInfo="uploadInfo" :isShowHide="true"
+ :prelang="prelang" :options="options" :bottomOffset="125" :ajaxFun="ajaxFun" ref="partTable">
<template #toolbar></template>
</ttable>
<!-- 寮圭獥, 鏂板 / 淇敼 -->
- <table-form
- v-if="addOrUpdateVisible"
- ref="addOrUpdate"
- @refreshDataList="getData"
- ></table-form>
- <PrintLabelForm
- :currshowlist.sync="showPrintLabelForm"
- :printLabelInfo="printLabelInfo"
- />
+ <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>
+ <PrintLabelForm :currshowlist.sync="showPrintLabelForm" :printLabelInfo="printLabelInfo" />
</basic-container>
+ <el-dialog title="鑾峰彇IFS闆朵欢" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
+ <el-row>
+ <el-col :span="6" style="height: 40px;line-height: 30px;">
+ 鍚屾鏃ユ湡锛�
+ </el-col>
+ <el-col :span="18">
+ <el-date-picker style="width: 100%;height: 100%;" v-model="selectDate" type="date" placeholder="閫夋嫨鏃ユ湡">
+ </el-date-picker>
+ </el-col>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="handleClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="syncIfs">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -34,12 +33,13 @@
import { mapGetters } from 'vuex'
import ttable from '@/views/common/ztt-table.vue'
import { remote } from '../../../api/admin/dict'
-import { dateFormat } from '@/util/date'
+import { dateFormat,dateFormatYearMonthDate,dateFormatPlus } from '@/util/date'
import PrintLabelForm from './print-label-form.vue'
-
export default {
data() {
return {
+ selectDate: "",
+ dialogVisible: false,
ajaxFun: fetchList,
addOrUpdateVisible: false,
multipleSelection: [],
@@ -363,9 +363,9 @@
fun: this.addOrUpdateHandle
},
{
- text: '鍚屾ERP',
+ text: '鑾峰彇IFS闆朵欢',
type: 'primary',
- fun: this.syncIfs,
+ fun: this.syncISDate,
loading: false
},
{
@@ -427,6 +427,10 @@
...mapGetters(['permissions'])
},
methods: {
+ handleClose() {
+ this.selectDate = "";
+ this.dialogVisible = false
+ },
// 鑾峰彇鏁版嵁鍒楄〃
getData() {
this.$refs.partTable.getDataList()
@@ -446,7 +450,7 @@
closeOnClickModal: false,
type: 'warning'
})
- .then(function() {
+ .then(function () {
return delObj(row.id)
})
.then((data) => {
@@ -627,14 +631,52 @@
// this.$message.warning('璇峰厛閫夋嫨闆朵欢锛屽啀杩涜鍚屾锛�')
// }
// },
+ syncISDate() {
+ this.dialogVisible = true
+ this.selectDate = ''
+ },
+ dateFormat(longTypeDate) {
+ var dateTypeDate = "";
+ var date = new Date();
+ date.setTime(longTypeDate);
+ dateTypeDate += date.getFullYear(); //骞�
+ dateTypeDate += "-" + getMonth(date); //鏈�
+ dateTypeDate += "-" + getDay(date); //鏃�
+ return dateTypeDate;
+ },
syncIfs() {
- syncPart({})
+ this.table.toolbar.find((e) => e.text === '鑾峰彇IFS闆朵欢').loading = true
+ this.dialogVisible = false
+ let datas = new FormData()
+ let times = null;
+ if (this.selectDate != '' && this.selectDate != null) {
+ times=dateFormatPlus(this.selectDate)
+ }else{
+ times=null
+ }
+ datas.set("date", times)
+ // console.log(datas.get("date"));
+ // return ;np
+ // console.log(datas.get("date"));
+ // console.log(this.selectDate);
+ // return
+ syncPart(datas)
.then((res) => {
const data = res.data
+ console.log(data);
if (data.code === 0) {
- this.$message.success('寮�濮嬪悓姝�')
+ if (data.data > 0) {
+ this.$message.success('鍚屾鎴愬姛' + data.data + "鏉℃暟鎹�")
+ }
+ if (data.data < 1) {
+ this.$message.warning("璇ユ棩鏈熸病鏈夋柊鐨勯浂浠舵暟鎹�");
+ }
+ this.table.toolbar.find((e) => e.text === '鑾峰彇IFS闆朵欢').loading = false
+ this.getData()
} else {
- this.$message.error('鍚屾ERP澶辫触')
+ this.$message.error('鍚屾IFS澶辫触')
+ this.table.toolbar.find((e) => e.text === '鑾峰彇IFS闆朵欢').loading = false
+ this.getData()
}
})
.catch((e) => {
--
Gitblit v1.9.3