shaogen1995 4 лет назад
Родитель
Сommit
e0a6a2226b

+ 22 - 11
src/views/collect/collect1_add.vue

@@ -270,18 +270,29 @@ export default {
       })
     },
     // 点击提交
-    async submit () {
-      if (this.tableData.some(v => v.outPath === '')) return this.$message.warning('提用位置不能为空')
-      if (this.fromData.textarea.trim() === '') return this.$message.warning('提用说明不能为空')
-      // 手动整理所有输入的出库位置信息
-      this.tableData.forEach((v, i) => {
-        this.locations[v.id] = this.tableData[i].outPath
+    submit () {
+      this.$confirm('是否确认提交?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        if (this.tableData.some(v => v.outPath === '')) return this.$message.warning('提用位置不能为空')
+        if (this.fromData.textarea.trim() === '') return this.$message.warning('提用说明不能为空')
+        // 手动整理所有输入的出库位置信息
+        this.tableData.forEach((v, i) => {
+          this.locations[v.id] = this.tableData[i].outPath
+        })
+        const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, type: this.fromData.source, location: this.locations }
+        // console.log(999, obj)
+        await holding1submit(obj)
+        this.$message.success('提交成功')
+        this.$router.push('/layout/collect1')
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
       })
-      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, type: this.fromData.source, location: this.locations }
-      // console.log(999, obj)
-      await holding1submit(obj)
-      this.$message.success('提交成功')
-      this.$router.push('/layout/collect1')
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 18 - 8
src/views/collect/collect2_add.vue

@@ -252,14 +252,24 @@ export default {
       })
     },
     // 点击提交
-    async submit () {
-      if (this.fromData.textarea.trim() === '') return this.$message.warning('注销说明不能为空')
-
-      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1 }
-      // console.log(999, obj)
-      await holding1submit(obj)
-      this.$message.success('提交成功')
-      this.$router.push('/layout/collect2')
+    submit () {
+      this.$confirm('是否确认提交?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        if (this.fromData.textarea.trim() === '') return this.$message.warning('注销说明不能为空')
+        const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1 }
+        // console.log(999, obj)
+        await holding1submit(obj)
+        this.$message.success('提交成功')
+        this.$router.push('/layout/collect2')
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
+      })
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 11 - 9
src/views/holding/holding0_DiaEdit.vue

@@ -70,7 +70,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="三级" :value="3"></el-option>
             <el-option label="二级" :value="2"></el-option>
             <el-option label="一级" :value="1"></el-option>
@@ -86,7 +86,7 @@
             placeholder="质地类型"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="单一质地" :value="0"></el-option>
             <el-option label="复合质地" :value="1"></el-option>
           </el-select>
@@ -124,7 +124,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="完整" :value="1"></el-option>
             <el-option label="基本完整" :value="0"></el-option>
             <el-option label="残缺" :value="-1"></el-option>
@@ -136,7 +136,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="已修复" :value="3"></el-option>
             <el-option label="继续修复" :value="2"></el-option>
             <el-option label="需要修复" :value="1"></el-option>
@@ -156,7 +156,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="一套多件" :value="1"></el-option>
             <el-option label="单件" :value="0"></el-option>
           </el-select>
@@ -357,7 +357,7 @@ export default {
         width: '' // 宽
       },
       checkInScope: [
-        '',
+        '请选择',
         '1949.10.1前',
         '1949.10.1-1965',
         '1966-1976',
@@ -365,7 +365,7 @@ export default {
         '2001至今'
       ], // 入藏时间范围
       qualityRange: [
-        '',
+        '请选择',
         '<0.01kg',
         '0.01-1kg',
         '1-50kg',
@@ -533,6 +533,8 @@ export default {
       this.ruleForm.registerId = this.registerId
       try {
         await this.$refs.ruleForm.validate()
+        if (this.ruleForm.qualityScope === '请选择') this.ruleForm.qualityScope = ''
+        if (this.ruleForm.checkInScope === '请选择') this.ruleForm.checkInScope = ''
         if (this.ruleForm.goodsTypeId === '') return this.$message.warning('文物类别没有选择!')
         if (this.ruleForm.level === '') return this.$message.warning('文物级别没有选择!')
         if (this.ruleForm.textureType === '') return this.$message.warning('文物质地没有选择!')
@@ -568,11 +570,11 @@ export default {
     // 获取文物编号类型
     const res = await getGoodsNumType()
     this.numType = res.data
-    this.numType.unshift({ id: '', name: '' })
+    this.numType.unshift({ id: '', name: '请选择' })
     // 获取文物类型
     const res2 = await getGoodsType()
     this.objectType = res2.data
-    this.objectType.unshift({ id: '', name: '' })
+    this.objectType.unshift({ id: '', name: '请选择' })
   },
   beforeCreate () {}, // 生命周期 - 创建之前
   beforeMount () {}, // 生命周期 - 挂载之前

+ 11 - 9
src/views/holding/holding0_Dialog.vue

@@ -70,7 +70,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" :value='null'></el-option>
             <el-option label="三级" :value="3"></el-option>
             <el-option label="二级" :value="2"></el-option>
             <el-option label="一级" :value="1"></el-option>
@@ -86,7 +86,7 @@
             placeholder="质地类型"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" :value='null'></el-option>
             <el-option label="单一质地" :value="0"></el-option>
             <el-option label="复合质地" :value="1"></el-option>
           </el-select>
@@ -124,7 +124,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" :value='null'></el-option>
             <el-option label="完整" :value="1"></el-option>
             <el-option label="基本完整" :value="0"></el-option>
             <el-option label="残缺" :value="-1"></el-option>
@@ -136,7 +136,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" :value='null'></el-option>
             <el-option label="已修复" :value="3"></el-option>
             <el-option label="继续修复" :value="2"></el-option>
             <el-option label="需要修复" :value="1"></el-option>
@@ -158,7 +158,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" :value='null'></el-option>
             <el-option label="一套多件" :value="1"></el-option>
             <el-option label="单件" :value="0"></el-option>
           </el-select>
@@ -361,7 +361,7 @@ export default {
         width: '' // 宽
       },
       checkInScope: [
-        '',
+        '请选择',
         '1949.10.1前',
         '1949.10.1-1965',
         '1966-1976',
@@ -369,7 +369,7 @@ export default {
         '2001至今'
       ], // 入藏时间范围
       qualityRange: [
-        '',
+        '请选择',
         '<0.01kg',
         '0.01-1kg',
         '1-50kg',
@@ -520,6 +520,8 @@ export default {
         // 清空表格数据
         this.tableData = this.tempData = []
         this.ruleForm.registerId = this.registerId
+        if (this.ruleForm.qualityScope === '请选择') this.ruleForm.qualityScope = ''
+        if (this.ruleForm.checkInScope === '请选择') this.ruleForm.checkInScope = ''
         if (this.ruleForm.goodsTypeId === '') return this.$message.warning('文物类别没有选择!')
         if (this.ruleForm.level === '') return this.$message.warning('文物级别没有选择!')
         if (this.ruleForm.textureType === '') return this.$message.warning('文物质地没有选择!')
@@ -586,11 +588,11 @@ export default {
     // 获取文物编号类型
     const res = await getGoodsNumType()
     this.numType = res.data
-    this.numType.unshift({ id: '', name: '' })
+    this.numType.unshift({ id: null, name: '请选择' })
     // 获取文物类型
     const res2 = await getGoodsType()
     this.objectType = res2.data
-    this.objectType.unshift({ id: '', name: '' })
+    this.objectType.unshift({ id: null, name: '请选择' })
   },
   beforeCreate () {}, // 生命周期 - 创建之前
   beforeMount () {}, // 生命周期 - 挂载之前

+ 22 - 10
src/views/holding/holding0_add.vue

@@ -191,16 +191,28 @@ export default {
       })
     },
     // 点击提交
-    async submit (id) {
-      if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
-      if (this.fromData.unit.trim() === '') return this.$message.warning('单位或个人不能为空')
-      if (this.fromData.description.trim() === '') return this.$message.warning('登记说明不能为空')
-      this.fromData.status = 1
-      const res = await addSubmit({ ...this.fromData, id: this.mydata.id })
-      if (res.code === 0) {
-        this.$message.success('提交成功')
-        this.$router.push('/layout/holding0')
-      }
+    submit (id) {
+      this.$confirm('是否确认提交?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
+        if (this.fromData.unit.trim() === '') return this.$message.warning('单位或个人不能为空')
+        if (this.fromData.description.trim() === '') return this.$message.warning('登记说明不能为空')
+        this.fromData.status = 1
+        const res = await addSubmit({ ...this.fromData, id: this.mydata.id })
+        if (res.code === 0) {
+          this.$message.success('提交成功')
+          this.$router.push('/layout/holding0')
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
+      })
+
       // console.log(6666, res)
     },
     // 点击编辑

+ 20 - 9
src/views/holding/holding1_add.vue

@@ -258,15 +258,26 @@ export default {
       })
     },
     // 点击提交
-    async submit () {
-      if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
-      if (this.tableData.some(v => v.location === '')) return this.$message.warning('藏品位置不能为空')
-      if (this.fromData.textarea.trim() === '') return this.$message.warning('入库说明不能为空')
-      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, location: this.location }
-      // console.log(999, obj)
-      await holding1submit(obj)
-      this.$message.success('提交成功')
-      this.$router.push('/layout/holding1')
+    submit () {
+      this.$confirm('是否确认提交?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
+        if (this.tableData.some(v => v.location === '')) return this.$message.warning('藏品位置不能为空')
+        if (this.fromData.textarea.trim() === '') return this.$message.warning('入库说明不能为空')
+        const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, location: this.location }
+        // console.log(999, obj)
+        await holding1submit(obj)
+        this.$message.success('提交成功')
+        this.$router.push('/layout/holding1')
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
+      })
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 23 - 12
src/views/holding/holding2_add.vue

@@ -271,19 +271,30 @@ export default {
       })
     },
     // 点击提交
-    async submit () {
-      if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
-      if (this.tableData.some(v => v.outPath === '')) return this.$message.warning('出库位置不能为空')
-      if (this.fromData.textarea.trim() === '') return this.$message.warning('出库说明不能为空')
-      // 手动整理所有输入的出库位置信息
-      this.tableData.forEach((v, i) => {
-        this.locations[v.id] = this.tableData[i].outPath
+    submit () {
+      this.$confirm('是否确认提交?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
+        if (this.tableData.some(v => v.outPath === '')) return this.$message.warning('出库位置不能为空')
+        if (this.fromData.textarea.trim() === '') return this.$message.warning('出库说明不能为空')
+        // 手动整理所有输入的出库位置信息
+        this.tableData.forEach((v, i) => {
+          this.locations[v.id] = this.tableData[i].outPath
+        })
+        const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, type: this.fromData.source, location: this.locations }
+        // console.log(999, obj)
+        await holding1submit(obj)
+        this.$message.success('提交成功')
+        this.$router.push('/layout/holding2')
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
       })
-      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1, type: this.fromData.source, location: this.locations }
-      // console.log(999, obj)
-      await holding1submit(obj)
-      this.$message.success('提交成功')
-      this.$router.push('/layout/holding2')
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 11 - 9
src/views/holding/holding3_DiaEdit.vue

@@ -70,7 +70,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="三级" :value="3"></el-option>
             <el-option label="二级" :value="2"></el-option>
             <el-option label="一级" :value="1"></el-option>
@@ -86,7 +86,7 @@
             placeholder="质地类型"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="单一质地" :value="0"></el-option>
             <el-option label="复合质地" :value="1"></el-option>
           </el-select>
@@ -124,7 +124,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="完整" :value="1"></el-option>
             <el-option label="基本完整" :value="0"></el-option>
             <el-option label="残缺" :value="-1"></el-option>
@@ -136,7 +136,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="已修复" :value="3"></el-option>
             <el-option label="继续修复" :value="2"></el-option>
             <el-option label="需要修复" :value="1"></el-option>
@@ -156,7 +156,7 @@
             placeholder="请选择"
             style="width: 100%"
           >
-            <el-option label="" value=""></el-option>
+            <el-option label="请选择" value=""></el-option>
             <el-option label="一套多件" :value="1"></el-option>
             <el-option label="单件" :value="0"></el-option>
           </el-select>
@@ -358,7 +358,7 @@ export default {
         width: '' // 宽
       },
       checkInScope: [
-        '',
+        '请选择',
         '1949.10.1前',
         '1949.10.1-1965',
         '1966-1976',
@@ -366,7 +366,7 @@ export default {
         '2001至今'
       ], // 入藏时间范围
       qualityRange: [
-        '',
+        '请选择',
         '<0.01kg',
         '0.01-1kg',
         '1-50kg',
@@ -546,6 +546,8 @@ export default {
       this.ruleForm.registerId = this.registerId
       try {
         await this.$refs.ruleForm.validate()
+        if (this.ruleForm.qualityScope === '请选择') this.ruleForm.qualityScope = ''
+        if (this.ruleForm.checkInScope === '请选择') this.ruleForm.checkInScope = ''
         if (this.ruleForm.goodsTypeId === '') return this.$message.warning('文物类别没有选择!')
         if (this.ruleForm.level === '') return this.$message.warning('文物级别没有选择!')
         if (this.ruleForm.textureType === '') return this.$message.warning('文物质地没有选择!')
@@ -580,11 +582,11 @@ export default {
     // 获取文物编号类型
     const res = await getGoodsNumType()
     this.numType = res.data
-    this.numType.unshift({ id: '', name: '' })
+    this.numType.unshift({ id: '', name: '请选择' })
     // 获取文物类型
     const res2 = await getGoodsType()
     this.objectType = res2.data
-    this.objectType.unshift({ id: '', name: '' })
+    this.objectType.unshift({ id: '', name: '请选择' })
   },
   beforeCreate () {}, // 生命周期 - 创建之前
   beforeMount () {}, // 生命周期 - 挂载之前

+ 18 - 7
src/views/holding/holding5_add.vue

@@ -254,13 +254,24 @@ export default {
     },
     // 点击提交
     async submit () {
-      if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
-      if (this.fromData.textarea.trim() === '') return this.$message.warning('注销说明不能为空')
-      const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1 }
-      // console.log(999, obj)
-      await holding1submit(obj)
-      this.$message.success('提交成功')
-      this.$router.push('/layout/holding5')
+      this.$confirm('是否确认提交?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        if (this.tableData.length === 0) return this.$message.warning('至少添加一条藏品信息')
+        if (this.fromData.textarea.trim() === '') return this.$message.warning('注销说明不能为空')
+        const obj = { description: this.fromData.textarea, goodsIds: this.goodsIds.join(','), id: this.mydata.id, status: 1 }
+        // console.log(999, obj)
+        await holding1submit(obj)
+        this.$message.success('提交成功')
+        this.$router.push('/layout/holding5')
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消提交'
+        })
+      })
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 12 - 4
src/views/home/index.vue

@@ -84,6 +84,7 @@ import { PieChart } from 'echarts/charts'
 import { LabelLayout } from 'echarts/features'
 import { CanvasRenderer } from 'echarts/renderers'
 
+import { getList as getList4 } from '@/apis/holding4'
 import { getList as collect2 } from '@/apis/collect2'
 import { getList as collect1 } from '@/apis/collect1'
 import { getList as getList5 } from '@/apis/holding5'
@@ -114,8 +115,10 @@ export default {
         { name: '藏品登记', inoc: 0, push: '/layout/holding0' },
         { name: '入库管理', inoc: 0, push: '/layout/holding1' },
         { name: '出库管理', inoc: 0, push: '/layout/holding2' },
+        { name: '藏品修改', inoc: 0, push: '/layout/holding4' },
         { name: '藏品注销', inoc: 0, push: '/layout/holding5' },
         { name: '征集品提用', inoc: 0, push: '/layout/collect1' },
+        { name: '征集品修改', inoc: 0, push: '/layout/holding4' },
         { name: '征集品注销', inoc: 0, push: '/layout/collect2' }
 
       ]
@@ -163,20 +166,25 @@ export default {
     res2.data.list.forEach(v => {
       if (v.status === 1 || v.status === 0 || v.status === 3) this.dingdong[2].inoc++
     })
+    // 进页面拿数据--藏品修改
+    const res4 = await getList4({ pageNum: 1, pageSize: 99999 })
+    res4.data.list.forEach(v => {
+      if (v.status === 1) this.dingdong[3].inoc++
+    })
     // 进页面拿数据--藏品注销
     const res5 = await getList5({ pageNum: 1, pageSize: 99999 })
     res5.data.list.forEach(v => {
-      if (v.status === 1 || v.status === 0) this.dingdong[3].inoc++
+      if (v.status === 1 || v.status === 0) this.dingdong[4].inoc++
     })
     // 进页面拿数据--征集品提用
     const col1 = await collect1({ pageNum: 1, pageSize: 99999 })
     col1.data.list.forEach(v => {
-      if (v.status === 1 || v.status === 0 || v.status === 3) this.dingdong[4].inoc++
+      if (v.status === 1 || v.status === 0 || v.status === 3) this.dingdong[5].inoc++
     })
     // 进页面拿数据--征集品注销
     const col2 = await collect2({ pageNum: 1, pageSize: 99999 })
     col2.data.list.forEach(v => {
-      if (v.status === 1 || v.status === 0) this.dingdong[5].inoc++
+      if (v.status === 1 || v.status === 0) this.dingdong[7].inoc++
     })
     // 文物类别数据处理
     const Datares = await getReport()
@@ -371,7 +379,7 @@ export default {
         align-items: center;
         justify-content: center;
         flex-direction: column;
-        height: 118px;
+        height: 95px;
         float: left;
         width: 50%;
         border: 1px solid #ccc;

+ 0 - 1
src/views/statistics/statistics1.vue

@@ -64,7 +64,6 @@
               </div>
               <div class="title_left">
                 <p>{{ item.name }}分布</p>
-                <span>每日0:00刷新</span>
               </div>
             </div>
           </div>