// /**分页查询接口重试日志 */
import request from '@/utils/request'

import { UPCLOUD_RDC_TMS_MAINDATA_SERVICE, UPCLOUD_RDC_TMS_BUSINESS_SERVICE } from '@/config/serviceSettings.js'
const business = UPCLOUD_RDC_TMS_BUSINESS_SERVICE
const serviceName = UPCLOUD_RDC_TMS_MAINDATA_SERVICE

export const mainTableInfoUrl = business + '/abnormalShipbill/page'
export const goodsTableUrl = business + '/abnormalShipbill/item'
export const packageTableUrl = business + '/abnormalShipbill/package'
export const advancedQueryUrl = business + '/abnormalShipbill/abnormal'
//运输管理-/运单关闭
export const closeArrangeGoods = (_this, data) => {
  let confirmLoading = true
  return new Promise((resolve) => {
    _this.$confirm({
      title: '是否关闭运单?',
      confirmLoading,
      onOk(clear) {
        confirmLoading = true
        return request({
          url: business + '/abnormalShipbill/close_abnormal_shipbill',
          method: 'post',
          data,
        })
          .then((response) => {
            if (response.success) {
              clear()
              _this.$refs.mainTable.reload()
              _this.$message.success(response.message)
            } else {
              _this.$exception(response)
            }
            setTimeout(() => {
              confirmLoading = false
            }, 1000)
            return resolve(response)
          })
          .catch((response) => {
            confirmLoading = false
          })
      },
    })
  })
}



export const exportUrls = {
  allUrl: business + '/abnormalShipbill/export_all_shipbill',
  currentUrl: business + '/abnormalShipbill/export_page_shipbill',
  selectUrl: business + '/abnormalShipbill/export_select_line_shipbill',
  ids:[]
}
export const printUrl = business + '/abnormalShipbill/print'
