|
|
@@ -94,7 +94,9 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="myLook(row)"
|
|
|
- v-if="row.status !== '主任审核中'&&row.status !== '馆长审核中'"
|
|
|
+ v-if="
|
|
|
+ row.status !== '主任审核中' && row.status !== '馆长审核中'
|
|
|
+ "
|
|
|
>查看</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -113,6 +115,15 @@
|
|
|
>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
+ @click="applyMoveFn(row)"
|
|
|
+ v-if="
|
|
|
+ row.status === '主任不通过' || row.status === '馆长不通过'
|
|
|
+ "
|
|
|
+ v-show="userLimits.anewOK"
|
|
|
+ >重新提交</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
@click="delData(row.id, row.status)"
|
|
|
v-if="row.status !== '已完成'"
|
|
|
v-show="userLimits.del"
|
|
|
@@ -137,10 +148,41 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 点击申请移库出现的弹窗 -->
|
|
|
+ <el-dialog title="申请移库" :visible.sync="moveDialog" class="myMove">
|
|
|
+ <div class="block">
|
|
|
+ <div class="block_box">
|
|
|
+ <span>入库位置:</span>
|
|
|
+ <!-- 级联选择 -->
|
|
|
+ <el-cascader
|
|
|
+ style="width: 500px"
|
|
|
+ disabled
|
|
|
+ :props="{ value: 'id', label: 'name' }"
|
|
|
+ v-model="valueOne"
|
|
|
+ :options="options"
|
|
|
+ ></el-cascader>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="demonstration">移库位置:</span>
|
|
|
+ <el-cascader
|
|
|
+ style="width: 500px"
|
|
|
+ :props="{ value: 'id', label: 'name' }"
|
|
|
+ v-model="moveValue"
|
|
|
+ :options="options"
|
|
|
+ @change="handleChange"
|
|
|
+ ></el-cascader>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="moveBtn">
|
|
|
+ <el-button type="primary" @click="moveOk">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getTreeList } from '@/apis/statistics0'
|
|
|
+import { applyMove } from '@/apis/holding3'
|
|
|
import { getList, delData } from '@/apis/statistics2'
|
|
|
import TabList from '@/components/tabLeft3.vue'
|
|
|
export default {
|
|
|
@@ -151,7 +193,9 @@ export default {
|
|
|
userLimits: {
|
|
|
del: false,
|
|
|
audit: false,
|
|
|
- auditTow: false
|
|
|
+ auditTow: false,
|
|
|
+ // 重新提交
|
|
|
+ anewOK: false
|
|
|
}, // 用户权限数据
|
|
|
total: 0,
|
|
|
myData: {
|
|
|
@@ -175,7 +219,15 @@ export default {
|
|
|
type: '',
|
|
|
time: '',
|
|
|
// 表格数据
|
|
|
- tableData: []
|
|
|
+ tableData: [],
|
|
|
+ // 重新提交
|
|
|
+ moveDialog: false,
|
|
|
+ tempIds: '',
|
|
|
+ moveValue: null,
|
|
|
+ options: [],
|
|
|
+ valueOne: '',
|
|
|
+ // 点击的藏品id
|
|
|
+ myIdAnew: ''
|
|
|
}
|
|
|
},
|
|
|
// 监听属性 类似于data概念
|
|
|
@@ -189,6 +241,48 @@ export default {
|
|
|
},
|
|
|
// 方法集合
|
|
|
methods: {
|
|
|
+ // 点击重新提交
|
|
|
+ async moveOk () {
|
|
|
+ if (this.tempIds === '') {
|
|
|
+ return this.$message.warning('还未选择移库位置!')
|
|
|
+ }
|
|
|
+ if (this.myObj.storageId === this.tempIds) {
|
|
|
+ console.log(this.myObj.storageId, this.tempIds)
|
|
|
+ return this.$message.warning('不能与之前入库位置相同!')
|
|
|
+ }
|
|
|
+ const res = await applyMove(this.myObj.goodsId, this.tempIds)
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.moveDialog = false
|
|
|
+ this.$message.success('申请成功')
|
|
|
+ // 更新页面
|
|
|
+ this.stateArr[1].num++
|
|
|
+ // 发请求删除
|
|
|
+ await delData(this.myIdAnew)
|
|
|
+ // 发请求刷新页面
|
|
|
+ this.getList(this.myData)
|
|
|
+ this.stateArr[3].num--
|
|
|
+ } else this.$message.error(res.msg)
|
|
|
+ // console.log(999, res)
|
|
|
+ },
|
|
|
+ handleChange (val) {
|
|
|
+ this.tempIds = val.join(',')
|
|
|
+ },
|
|
|
+ applyMoveFn (row) {
|
|
|
+ this.myObj = row
|
|
|
+ const temp = row.storageId.split(',')
|
|
|
+ this.valueOne = []
|
|
|
+ temp.forEach((v) => {
|
|
|
+ if (v !== '') this.valueOne.push(Number(v))
|
|
|
+ })
|
|
|
+ // console.log(998, this.valueOne)
|
|
|
+ // console.log(this.$refs.cascaderAddr)
|
|
|
+ // const thsAreaCode = this.$refs.cascaderAddr.getCheckedNodes()
|
|
|
+ // const txt = thsAreaCode[0].pathLabels.join('/')
|
|
|
+ // this.rukuTxt = txt
|
|
|
+ this.moveDialog = true
|
|
|
+ // 把点击的藏品id存起来
|
|
|
+ this.myIdAnew = row.id
|
|
|
+ },
|
|
|
// 点击查询
|
|
|
inquire () {
|
|
|
this.myData.pageNum = 1
|
|
|
@@ -267,9 +361,13 @@ export default {
|
|
|
// 发请求刷新页面
|
|
|
this.getList(this.myData)
|
|
|
// 更新顶部数据
|
|
|
- if (status === '馆长审核中' || status === '主任审核中') this.stateArr[1].num--
|
|
|
+ if (status === '馆长审核中' || status === '主任审核中') {
|
|
|
+ this.stateArr[1].num--
|
|
|
+ }
|
|
|
if (status === '已完成') this.stateArr[2].num--
|
|
|
- if (status === '主任不通过' || status === '馆长不通过') this.stateArr[3].num--
|
|
|
+ if (status === '主任不通过' || status === '馆长不通过') {
|
|
|
+ this.stateArr[3].num--
|
|
|
+ }
|
|
|
this.stateArr[0].num--
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
@@ -311,7 +409,9 @@ export default {
|
|
|
date.push(this.gettime(e[i]))
|
|
|
}
|
|
|
this.myData.startTime = date[0]
|
|
|
- if (date[1]) { this.myData.endTime = date[1].replace('00:00:00', '23:59:59') }
|
|
|
+ if (date[1]) {
|
|
|
+ this.myData.endTime = date[1].replace('00:00:00', '23:59:59')
|
|
|
+ }
|
|
|
},
|
|
|
gettime (data) {
|
|
|
const value =
|
|
|
@@ -336,7 +436,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created () {
|
|
|
+ async created () {
|
|
|
+ // 获取位置信息
|
|
|
+ const res1 = await getTreeList()
|
|
|
+ this.options = res1.data
|
|
|
this.getList(this.myData)
|
|
|
},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
@@ -358,6 +461,8 @@ export default {
|
|
|
// 获取角色权限树
|
|
|
let temp2 = localStorage.getItem('daliCK_limits')
|
|
|
temp2 = JSON.parse(temp2)
|
|
|
+ // 重新提交的权限和藏品的编辑权限一样
|
|
|
+ this.userLimits.anewOK = temp2[1].children[1].authority
|
|
|
this.userLimits.del = temp2[7].children[0].authority
|
|
|
this.userLimits.audit = temp2[7].children[1].authority
|
|
|
this.userLimits.auditTow = temp2[7].children[2].authority
|
|
|
@@ -377,7 +482,18 @@ export default {
|
|
|
/deep/#mytitle > span {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
-
|
|
|
+.block {
|
|
|
+ & > div {
|
|
|
+ margin: 0px 100px 0;
|
|
|
+ &:nth-of-type(1) {
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .block_box{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+}
|
|
|
display: flex;
|
|
|
.right {
|
|
|
width: 100%;
|