{{ index + 1 }}.
申请时间: {{ item.createTime }}
@@ -116,7 +116,7 @@ const tableList = ref([])
const total = ref(0)
const options = ref([
{
- text: '提交',
+ text: '2f8cf0',
style: {
backgroundColor: '#2f8cf0',
},
@@ -159,7 +159,17 @@ const getList = async () => {
const res = await getBackListAPI(params)
console.log('🚀 ~ getList ~ res:', res)
if (res.code == 200) {
- tableList.value = res.data.rows
+ tableList.value = res.data.rows.map((item, index) => {
+ let options = [
+ // { text: '电子签名', style: { backgroundColor: '#c6bf3b' } },
+ { text: '编辑', style: { backgroundColor: '#2f8cf0' } },
+ { text: '删除', style: { backgroundColor: '#ff4949' } },
+ ]
+ return {
+ ...item,
+ options: item.taskStatus == 4 ? [] : options, // 如果任务状态为4,则不显示操作按钮
+ }
+ })
console.log('🚀 ~ getList ~ tableList.value:', tableList.value)
total.value = res.data.total
}
@@ -198,7 +208,7 @@ const onScrollTolower = () => {
const onClickSwipe = async (e, item) => {
console.log('🚀 ~ onClickSwipe ~ e:', e, item)
try {
- if (e.index == 0) {
+ if (e.content.text == '提交') {
// 提交
const params = JSON.stringify({
id: item.id,
@@ -220,7 +230,18 @@ const onClickSwipe = async (e, item) => {
icon: 'error',
})
}
- } else {
+ } else if (e.content.text == '编辑') {
+ // 编辑
+ console.log('🚀 ~ 编辑 ~ item:', item)
+ const params = JSON.stringify({
+ id: item.id,
+ taskId: item.taskId,
+ isEdit: true,
+ })
+ uni.navigateTo({
+ url: `/pages/toolsBack/toolsAddBack?params=${params}`,
+ })
+ } else if (e.content.text == '删除') {
// 删除
await deleteItem(item)
}
diff --git a/src/pages/toolsLease/codeOut.vue b/src/pages/toolsLease/codeOut.vue
index 0600c7c..57d7c12 100644
--- a/src/pages/toolsLease/codeOut.vue
+++ b/src/pages/toolsLease/codeOut.vue
@@ -1,6 +1,6 @@
-
@@ -63,7 +63,7 @@
-
+
出库方式: