|
@@ -172,6 +172,12 @@
|
|
|
>
|
|
|
提交
|
|
|
</el-button>
|
|
|
+ <el-button link type="primary" @click="onShelfFn(row,'1')" v-if="[2].includes(row.bulletinState) && !row.isArrive" v-auth="'auxiliary:notice:onShelf'">
|
|
|
+ 上架
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="offShelfFn(row, '1')" v-if="[2].includes(row.bulletinState) && row.isArrive" v-auth="'auxiliary:notice:offShelf'">
|
|
|
+ 下架
|
|
|
+ </el-button>
|
|
|
<el-button link type="primary" @click="onDetail(row, '1')" v-if="[1, 2].includes(row.bulletinState)"> 查看详情 </el-button>
|
|
|
</template>
|
|
|
</ProTable>
|
|
@@ -195,7 +201,7 @@ import {
|
|
|
bulletinBaseData,
|
|
|
bulletinCommit,
|
|
|
bulletinDelete,
|
|
|
- bulletinList,
|
|
|
+ bulletinList, bulletinPutAway,
|
|
|
circularBaseData,
|
|
|
circularCommit,
|
|
|
circularDelete,
|
|
@@ -441,6 +447,48 @@ const onCommit = (row: any, type: string) => {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
+// 上架
|
|
|
+const onShelfFn = (row: any, type: string) => {
|
|
|
+ ElMessageBox.confirm(`您确定要上架:【${row.title}】,是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ draggable: true,
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
+ autofocus: false,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ if (type === '0') {
|
|
|
+
|
|
|
+ }else {
|
|
|
+ bulletinPutAway({id:row.id,isArrive:true}).then(() => {
|
|
|
+ ElMessage.success('操作成功');
|
|
|
+ queryList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
+// 下架
|
|
|
+const offShelfFn = (row: any, type: string) => {
|
|
|
+ ElMessageBox.confirm(`您确定要下架:【${row.title}】,是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ draggable: true,
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
+ autofocus: false,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ if (type === '0') {
|
|
|
+
|
|
|
+ }else {
|
|
|
+ bulletinPutAway({id:row.id,isArrive:false}).then(() => {
|
|
|
+ ElMessage.success('操作成功');
|
|
|
+ queryList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(() => {})
|
|
|
+}
|
|
|
// 页面加载时
|
|
|
onMounted(() => {
|
|
|
getBaseData();
|