import { axios } from '@/utils/request'
import qs from 'qs'
import { UPCLOUD_RDC_TMS_BUSINESS_SERVICE, UPCLOUD_RDC_TMS_MAINDATA_SERVICE } from '@/config/serviceSettings.js'
const serviceName = UPCLOUD_RDC_TMS_BUSINESS_SERVICE
// 主表地址
export const listRemoteUrl = {
  url: serviceName + '/pending_review/page',
  method: 'post',
}

// 商品表地址
export const page_detail_item = {
  url: serviceName + '/pending_review/detail/list',
  method: 'post',
}

// 通过商品查包裹
export const page_package_item = {
  url: serviceName + '/pending_review/detail/package',
  method: 'post',
}

// 包裹表地址
export const page_detail_package = {
  url: serviceName + '/pending_review/package/list',
  method: 'post',
}

// 通过包裹查商品
export const page_item_package = {
  url: serviceName + '/pending_review/package/detail',
  method: 'post',
}

// 回退
export const Back = (data) => {
  return axios.post(serviceName + '/pending_review/back', data)
}

// 地址解析
export const parseAddress = (data) => {
  return axios.post(serviceName + '/pending_review/parse_address', data)
}

// 运单打印
export const Print = (data) => {
  return axios.post(serviceName + '/pending_review/print', qs.stringify(data), {
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 运单审核
export const Review = (data) => {
  return axios.post(serviceName + '/pending_review/review', data)
}

// 运单查看
export const viewUrl = (data) => {
  return axios.post(serviceName + '/pending_review/view', data)
}

// 定位
export const Location = (data) => {
  return axios.post(UPCLOUD_RDC_TMS_MAINDATA_SERVICE + '/common/shipbill/location', data)
}

export const dataSource = [
  {
    shipbillId: 'YD1000000046',
    shipbillNo: 'YD1000000046',
    branchId: null,
    branchCode: null,
    branchName: null,
    cargoOwnerId: '10000029',
    cargoOwnerCode: '011212',
    cargoOwnerName: '测试-2',
    orderNo: '00123123',
    orderType: 1,
    orderTypeName: '普通',
    orderBusinessType: 1,
    orderBusinessTypeName: '销售订单-直送',
    wmsOrderNo: '223213',
    deliveryMethodType: 1,
    deliveryMethodTypeName: '配送',
    transportType: 1,
    transportTypeName: '整车',
    temperatureRequirement: 1,
    temperatureRequirementName: '常温',
    estimatedPickupStartTime: '2022-06-17 13:46:00',
    estimatedDeliveryStartTime: '2022-06-18 13:46:00',
    transportAging: 95.967,
    orderDate: '2022-06-16 13:47:01',
    shipperType: 1,
    shipperTypeName: '客户',
    shipperUnitName: '客户2',
    shipperName: '收货方一',
    shipperProvince: '120000',
    shipperProvinceName: '天津市',
    shipperCity: '120100',
    shipperCityName: '天津市',
    shipperDistrict: '120104',
    shipperDistrictName: '南开区',
    shipperContact: '李梦',
    shipperPhoneNumber: '15927803305',
    shipperLandlineNumber: null,
    shipperEmail: '2222@qq.com',
    shipperAddress: '南开区',
    shipperPositioning: '已定位',
    shipperMemo: 'QQ群',
    consigneeType: 1,
    consigneeTypeName: '客户',
    consigneeUnitName: '客户2',
    consigneeName: '收货方一',
    consigneeProvince: '120000',
    consigneeProvinceName: '天津市',
    consigneeCity: '120100',
    consigneeCityName: '天津市',
    consigneeDistrict: '120104',
    consigneeDistrictName: '南开区',
    consigneeContact: '李梦',
    consigneePhoneNumber: '15927803305',
    consigneeLandlineNumber: null,
    consigneeEmail: '2222@qq.com',
    consigneeAddress: '南开区',
    consigneePositioning: '已定位',
    consigneeMemo: 'QQ群',
    lineName: null,
    totalPcs: 2,
    totalVolume: 2,
    totalWeight: 3,
    fatherShipbillId: null,
    fatherShipbillNo: null,
    originalShipbillId: null,
    originalShipbillNo: null,
    orderId: null,
    wmsOrderId: null,
    transportStatus: null,
    abnormalStatus: null,
    splitOrderStatus: null,
    splitOrderType: null,
    estimatedPickupEndTime: '2022-06-18 13:48:00',
    estimatedDeliveryEndTime: '2022-06-22 13:46:00',
    shipperUnitId: '1000000011',
    shipperUnitCode: '2',
    shipperId: '1000000018',
    shipperCode: '06',
    shipperRelatedPhoneNumber: null,
    shipperLongitude: 117.174707,
    shipperLatitude: 39.125602,
    shipperPickUpSign: 0,
    shipperAutoPickUpSign: 0,
    shipperPickUpPicture: 0,
    shipperPickUpRail: 0,
    consigneeUnitId: '1000000011',
    consigneeUnitCode: '2',
    consigneeId: '1000000018',
    consigneeCode: '06',
    consigneeRelatedPhoneNumber: null,
    consigneeLongitude: 117.174707,
    consigneeLatitude: 39.125602,
    consigneeDeliverySign: 0,
    consigneeAutoDeliverySign: 0,
    consigneeDeliveryPicture: 0,
    consigneeDeliveryRail: 0,
    lineId: null,
    lineCode: null,
    requestReceipt: 0,
    receiptPeriod: 0,
    actualTotalPcs: 2,
    actualTotalVolume: 2,
    actualTotalWeight: 3,
    packageWholePiece: null,
    packageLclPiece: null,
    packageTotalVolume: null,
    packageTotalWeight: null,
    backType: 1,
    backReason: '111',
    status: 5,
    statusName: '5',
    memo: null,
    background: null,
    color: null,
    signConfigId: null,
    extStr1: null,
    extStr2: null,
    extStr3: null,
    extStr4: null,
    extStr5: null,
    extNum1: null,
    extNum2: null,
    extNum3: null,
    extNum4: null,
    extNum5: null,
    extDate1: null,
    extDate2: null,
    extDate3: null,
    extDate4: null,
    extDate5: null,
    createtime: '2022-06-16 13:48:51',
    createperson: 'TMS系统管理员',
    updatetime: '2022-06-20 13:56:11',
    updateperson: 'TMS系统管理员',
  },
  {
    shipbillId: 'YD1000000047',
    shipbillNo: 'YD1000000047',
    branchId: null,
    branchCode: null,
    branchName: null,
    cargoOwnerId: '10000011',
    cargoOwnerCode: 'h',
    cargoOwnerName: '测试货主1',
    orderNo: '3332323',
    orderType: 1,
    orderTypeName: '普通',
    orderBusinessType: 1,
    orderBusinessTypeName: '销售订单-直送',
    wmsOrderNo: '2323',
    deliveryMethodType: 1,
    deliveryMethodTypeName: '配送',
    transportType: 1,
    transportTypeName: '整车',
    temperatureRequirement: 1,
    temperatureRequirementName: '常温',
    estimatedPickupStartTime: null,
    estimatedDeliveryStartTime: null,
    transportAging: 0,
    orderDate: null,
    shipperType: 2,
    shipperTypeName: '仓库',
    shipperUnitName: '仓库一',
    shipperName: '仓库一',
    shipperProvince: '140000',
    shipperProvinceName: '山西省',
    shipperCity: '140900',
    shipperCityName: '忻州市',
    shipperDistrict: '140981',
    shipperDistrictName: '原平市',
    shipperContact: '李梦',
    shipperPhoneNumber: '15927803305',
    shipperLandlineNumber: '1592780330512',
    shipperEmail: '2222@qq.com',
    shipperAddress: '原平市',
    shipperPositioning: '已定位',
    shipperMemo: '435',
    consigneeType: 2,
    consigneeTypeName: '仓库',
    consigneeUnitName: '仓库一',
    consigneeName: '仓库一',
    consigneeProvince: '140000',
    consigneeProvinceName: '山西省',
    consigneeCity: '140900',
    consigneeCityName: '忻州市',
    consigneeDistrict: '140981',
    consigneeDistrictName: '原平市',
    consigneeContact: '李梦',
    consigneePhoneNumber: '15927803305',
    consigneeLandlineNumber: '1592780330512',
    consigneeEmail: '2222@qq.com',
    consigneeAddress: '原平市',
    consigneePositioning: '已定位',
    consigneeMemo: '435',
    lineName: null,
    totalPcs: 1,
    totalVolume: 12,
    totalWeight: 11,
    fatherShipbillId: null,
    fatherShipbillNo: null,
    originalShipbillId: null,
    originalShipbillNo: null,
    orderId: null,
    wmsOrderId: null,
    transportStatus: null,
    abnormalStatus: null,
    splitOrderStatus: null,
    splitOrderType: null,
    estimatedPickupEndTime: null,
    estimatedDeliveryEndTime: null,
    shipperUnitId: '1000000011',
    shipperUnitCode: '001',
    shipperId: '1000000011',
    shipperCode: '001',
    shipperRelatedPhoneNumber: null,
    shipperLongitude: 112.69772,
    shipperLatitude: 38.750135,
    shipperPickUpSign: 0,
    shipperAutoPickUpSign: 0,
    shipperPickUpPicture: 0,
    shipperPickUpRail: 0,
    consigneeUnitId: '1000000011',
    consigneeUnitCode: '001',
    consigneeId: '1000000011',
    consigneeCode: '001',
    consigneeRelatedPhoneNumber: null,
    consigneeLongitude: 112.69772,
    consigneeLatitude: 38.750135,
    consigneeDeliverySign: 0,
    consigneeAutoDeliverySign: 0,
    consigneeDeliveryPicture: 0,
    consigneeDeliveryRail: 0,
    lineId: null,
    lineCode: null,
    requestReceipt: 0,
    receiptPeriod: 0,
    actualTotalPcs: 1,
    actualTotalVolume: 12,
    actualTotalWeight: 11,
    packageWholePiece: null,
    packageLclPiece: null,
    packageTotalVolume: null,
    packageTotalWeight: null,
    backType: null,
    backReason: null,
    status: 10,
    statusName: '10',
    memo: null,
    background: null,
    color: null,
    signConfigId: null,
    extStr1: null,
    extStr2: null,
    extStr3: null,
    extStr4: null,
    extStr5: null,
    extNum1: null,
    extNum2: null,
    extNum3: null,
    extNum4: null,
    extNum5: null,
    extDate1: null,
    extDate2: null,
    extDate3: null,
    extDate4: null,
    extDate5: null,
    createtime: '2022-06-17 17:54:07',
    createperson: 'TMS系统管理员',
    updatetime: '2022-06-17 17:54:07',
    updateperson: 'TMS系统管理员',
  },
]
