周宾
3 天以前 81dbb5d80f59a434702ea9264c66a93411430325
src/pages/inventoryManagement/receiptManagement/index.vue
@@ -54,6 +54,7 @@
                     <view class="value">{{ item.createBy }}</view>
                  </view>
                  <view class="item" style="justify-content: flex-end;">
                     <button class="mini-btn" type="warn" size="mini" style="margin-left: 0;margin-right: 20rpx;" @click="deleteGoods(item)">删除</button>
                     <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;" @click="openForm(item,'edit')">编辑</button>
                  </view>
               </view>
@@ -72,7 +73,7 @@
<script setup>
import { ref, reactive, computed } from 'vue'
import { listPage, listPageByCustom } from '@/api/inventoryManagement/receiptManagement.js'
import { listPage, listPageByCustom,deleteCustom } from '@/api/inventoryManagement/receiptManagement.js'
import { onShow, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import config from '@/config'
const baseUrl = config.baseUrl
@@ -131,6 +132,24 @@
   contentList.value = []
   getList()
}
const deleteGoods = async (goods) => {
   uni.showModal({
      title: '提示',
      content: '确定要删除该商品的入库吗?',
      success: function (res) {
         if (res.confirm) {
            uni.showLoading({
               title: '删除中...'
            })
            let params = [goods.id]
            deleteCustom(params).then(res => {
               uni.hideLoading()
               reloadPage()
            })
         }
      }
   })
}
const getList = async () => {
   let getListApi = null
   if (tabCurrent.value == 1) {