|
|
@@ -1,2075 +1,373 @@
|
|
|
+const Constants = require('@/utils/Constants.js');
|
|
|
+import Dialog from '@/dist/dialog/dialog.js';
|
|
|
+const mixins = require('@/mixins/index.js')
|
|
|
const app = getApp()
|
|
|
-const Constants = require('../../../../utils/Constants.js');
|
|
|
-const api = require('../../../../utils/api.js');
|
|
|
-import Dialog from '../../../../dist/dialog/dialog.js'
|
|
|
-const util = require('../../../../utils/util.js')
|
|
|
-const common = require('../../../../utils/common.js')
|
|
|
-const config = require('../../../../config/config.js')
|
|
|
Page({
|
|
|
-
|
|
|
+ mixins: [mixins],
|
|
|
/**
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
- annexPaths: [],
|
|
|
- barList: [],
|
|
|
- checked: false,
|
|
|
- fileList: [],
|
|
|
- flgToErp: false,
|
|
|
- form: {
|
|
|
- "orderType": 2,
|
|
|
- "deliveryPhone": "",
|
|
|
- "discountPromotion": 431.39,
|
|
|
- "orderId": 11981,
|
|
|
- "cpType": 4,
|
|
|
- "tDiscountStandard": 299.14,
|
|
|
- "sumRejectAmount": 0,
|
|
|
- "editTime": "2024-01-29T10:09:46.214203+08:00",
|
|
|
- "customerFrom": -1,
|
|
|
- "salesChannel": 1,
|
|
|
- "ascpId": 29195,
|
|
|
- "salesChannelCode": "10",
|
|
|
- "sale1Id": 20760,
|
|
|
- "sumReceiptAmount": 0,
|
|
|
- "sumGoodsAmount": 408752,
|
|
|
- "addressGcj02": {
|
|
|
- "latitude": 41.803274,
|
|
|
- "longitude": 123.408179
|
|
|
- },
|
|
|
- "orderSumOutAmount": 0,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orgName": "北海富安居店",
|
|
|
- "contactName": "",
|
|
|
- "sumUsePrestore": 0,
|
|
|
- "sumCollectedAmount": 0,
|
|
|
- "docCode": "销售订单",
|
|
|
- "fitupType": 87,
|
|
|
- "customerName": "1211代送客户测试001",
|
|
|
- "sumStandard": 136641,
|
|
|
- "linkPsiSystem": "DK-IBOSS",
|
|
|
- "orderCanOutList": [
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 1,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 100,
|
|
|
- "discountStandard": 11.24,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "iconThumPath": "haip/2023-04-21/19ae78a2639547d9aa961b58d20dbdbd.png",
|
|
|
- "id": "1479b100-c70c-437b-9039-3e598cdb0522",
|
|
|
- "itemAmount": 999,
|
|
|
- "itemIndex": 1,
|
|
|
- "ivtQty": 3,
|
|
|
- "nonStandardArea": 1,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 999,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36176,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 999,
|
|
|
- "orderQuantity": 1,
|
|
|
- "outGoingAmount": 999,
|
|
|
- "outGoingQty": 3,
|
|
|
- "outGoingQuantity": 1,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "pricePromotion": 999,
|
|
|
- "priceStandard": 8888,
|
|
|
- "promotionId": 211,
|
|
|
- "promotionItemId": 22944,
|
|
|
- "promotionName": "1",
|
|
|
- "promotionPriceType": 77,
|
|
|
- "promotionPriceTypeName": "爆款产品",
|
|
|
- "promotionType": 1,
|
|
|
- "promotionTypeName": "单品促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "EE920A00200B01",
|
|
|
- "skuId": 9537580,
|
|
|
- "skuModel": "HE920",
|
|
|
- "skuName": "【已淘汰】智能盖板HE920",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.05,
|
|
|
- "skuWeight": 0,
|
|
|
- "spuCode": "HE920",
|
|
|
- "spuId": 65410,
|
|
|
- "standardId": 308,
|
|
|
- "tItemAmount": 999,
|
|
|
- "tItemQuantity": 1,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "usableQty": 0,
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "bomSkuCode": "CY901DT2200B01",
|
|
|
- "bomSkuId": 161052,
|
|
|
- "canOutQuantity": 1,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 100,
|
|
|
- "discountStandard": 100,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "5ea261c3-1f36-4a69-b898-940979b805f5",
|
|
|
- "itemAmount": 3303,
|
|
|
- "itemIndex": 2,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 3303,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36177,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 3303,
|
|
|
- "orderQuantity": 1,
|
|
|
- "outGoingAmount": 3303,
|
|
|
- "outGoingQuantity": 1,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
|
|
|
- "pricePromotion": 3303,
|
|
|
- "priceStandard": 3303,
|
|
|
- "promotionName": "",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 0,
|
|
|
- "promotionTypeName": "正常品",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "CT901DT2200B01",
|
|
|
- "skuId": 9605810,
|
|
|
- "skuName": "落地式坐便器HC0901DT\\地排305\\无盖板",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.235,
|
|
|
- "skuWeight": 0,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213129,
|
|
|
- "tItemAmount": 3303,
|
|
|
- "tItemQuantity": 1,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "bomSkuCode": "CY901DT2200B01",
|
|
|
- "bomSkuId": 161052,
|
|
|
- "canOutQuantity": 1,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 100,
|
|
|
- "discountStandard": 100,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "bac1205c-a2de-4ed7-808c-b9be59070153",
|
|
|
- "itemAmount": 4450,
|
|
|
- "itemIndex": 3,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 4450,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36178,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 4450,
|
|
|
- "orderQuantity": 1,
|
|
|
- "outGoingAmount": 4450,
|
|
|
- "outGoingQuantity": 1,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
|
|
|
- "pricePromotion": 4450,
|
|
|
- "priceStandard": 4450,
|
|
|
- "promotionName": "",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 0,
|
|
|
- "promotionTypeName": "正常品",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "CQ501000000N01",
|
|
|
- "skuId": 9607630,
|
|
|
- "skuName": "电控盖板HQ501",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.063,
|
|
|
- "skuWeight": 0,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213130,
|
|
|
- "tItemAmount": 4450,
|
|
|
- "tItemQuantity": 1,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 10,
|
|
|
- "combinedSpecsId": 68,
|
|
|
- "combinedTypeId": 462,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 465.12,
|
|
|
- "discountStandard": 186.05,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "iconThumPath": "haip/2023-10-04/ded5bc0e7a9446cc831dd831b6b6bc47.png",
|
|
|
- "id": "b7558b1f-0b9e-4dce-9846-c5e6ea993e96",
|
|
|
- "itemAmount": 27907,
|
|
|
- "itemIndex": 4,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 27907,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36180,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 2790.7,
|
|
|
- "orderQuantity": 10,
|
|
|
- "outGoingAmount": 27907,
|
|
|
- "outGoingQuantity": 10,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
|
|
|
- "pricePromotion": 600,
|
|
|
- "priceStandard": 1500,
|
|
|
- "promotionId": 273,
|
|
|
- "promotionItemId": 598,
|
|
|
- "promotionName": "1115新活动",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 2,
|
|
|
- "promotionTypeName": "组合促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "FF1016000CHB0A",
|
|
|
- "skuId": 9418430,
|
|
|
- "skuModel": "HMF101-150",
|
|
|
- "skuName": "【已淘汰】面盆龙头HMF101-150\\壁式暗装\\单柄双控\\翻板式下水器",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.05,
|
|
|
- "skuWeight": 128,
|
|
|
- "spuCode": "HMF101-150",
|
|
|
- "spuId": 6938,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213154,
|
|
|
- "tItemAmount": 27907,
|
|
|
- "tItemQuantity": 10,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 10,
|
|
|
- "combinedSpecsId": 67,
|
|
|
- "combinedTypeId": 457,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 465.12,
|
|
|
- "discountStandard": 372.09,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "32a7c7ba-5572-485e-a895-96b6ddf18219",
|
|
|
- "itemAmount": 93023.3,
|
|
|
- "itemIndex": 5,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 93023.3,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36181,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 9302.33,
|
|
|
- "orderQuantity": 10,
|
|
|
- "outGoingAmount": 93023.3,
|
|
|
- "outGoingQuantity": 10,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
|
|
|
- "pricePromotion": 2000,
|
|
|
- "priceStandard": 2500,
|
|
|
- "promotionId": 273,
|
|
|
- "promotionItemId": 587,
|
|
|
- "promotionName": "1115新活动",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 2,
|
|
|
- "promotionTypeName": "组合促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "FB1033000CHB0A",
|
|
|
- "skuId": 9571300,
|
|
|
- "skuName": "【已淘汰】淋浴大花洒HMF103-333M\\壁式明装\\三功能",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.6,
|
|
|
- "skuWeight": 187,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213151,
|
|
|
- "tItemAmount": 93023.3,
|
|
|
- "tItemQuantity": 10,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 10,
|
|
|
- "combinedSpecsId": 64,
|
|
|
- "combinedTypeId": 456,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 465.12,
|
|
|
- "discountStandard": 348.84,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "e4b95f3f-6a46-416f-a817-8c1176cbe541",
|
|
|
- "itemAmount": 279069.7,
|
|
|
- "itemIndex": 6,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 279069.7,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36182,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 27906.97,
|
|
|
- "orderQuantity": 10,
|
|
|
- "outGoingAmount": 279069.7,
|
|
|
- "outGoingQuantity": 10,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
|
|
|
- "pricePromotion": 6000,
|
|
|
- "priceStandard": 8000,
|
|
|
- "promotionId": 273,
|
|
|
- "promotionItemId": 586,
|
|
|
- "promotionName": "1115新活动",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 2,
|
|
|
- "promotionTypeName": "组合促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "CT962EN2200B01",
|
|
|
- "skuId": 9553940,
|
|
|
- "skuModel": "HC0962",
|
|
|
- "skuName": "智能一体机陶瓷体HC0962\\地排305",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 2.09,
|
|
|
- "skuWeight": 0,
|
|
|
- "spuCode": "HC0962",
|
|
|
- "spuId": 27537,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213149,
|
|
|
- "tItemAmount": 279069.7,
|
|
|
- "tItemQuantity": 10,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- }
|
|
|
+ // 路由
|
|
|
+ routeObjName: 'order',
|
|
|
+ btnFormData: JSON.stringify({ flag: true }),
|
|
|
+ cardList: [
|
|
|
+ { name: 'main', title: mixins.$t("customerInformation") },
|
|
|
+ { name: 'relation' },
|
|
|
+ { name: 'items', title: mixins.$t("goodsDetail"), chooseGoodsFlag: true, itemAmt: '', displayNum: 2 },
|
|
|
+ { name: 'other', title: mixins.$t("otherInfo") }
|
|
|
+ ],
|
|
|
+ contentObj: {
|
|
|
+ main: [
|
|
|
+ { code: 'cusName', type: 'selectIcon', urlKey: 'selectCustomers', required: true, readonly: false, title: mixins.$t('customerName') },
|
|
|
+ { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone'), required: true },
|
|
|
+ { code: 'addressFull', type: 'address', title: mixins.$t('addressFull'), required: true },
|
|
|
+ { code: 'addressNo', type: 'str', required: true, title: mixins.$t('addressNo') },
|
|
|
+ { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel', title: mixins.$t('saleChannel') },
|
|
|
+ { code: 'cusFrom', name: 'cusFromName', type: 'drop', required: false, dropType: 'customerFrom', title: mixins.$t('customerSource') },
|
|
|
],
|
|
|
- "toiletCount": 2,
|
|
|
- "designStatus": "设计状态-无需",
|
|
|
- "tSumPromotion": 94752,
|
|
|
- "addressFull": "辽宁省沈阳市和平区辽宁省林业和草原局1211代送客户测试001",
|
|
|
- "merOrderType": 0,
|
|
|
- "deliveryTime": "2024-01-30T08:00:00+08:00",
|
|
|
- "sumQuantity": 6,
|
|
|
- "cpId": 20760,
|
|
|
- "sumWeight": 315,
|
|
|
- "orderStatus": "订单状态-通过",
|
|
|
- "orgId": 32402,
|
|
|
- "sumAmount": 408752,
|
|
|
- "customerPhone": "68888184848",
|
|
|
- "sale2Id": 29195,
|
|
|
- "sale2OpeMode": "分销模式-代送",
|
|
|
- "customerId": 3892,
|
|
|
- "staffName": "王英杰",
|
|
|
- "tSumGoodsAmount": 408752,
|
|
|
- "makingUser": 1005,
|
|
|
- "makingTime": "2024-01-29T10:09:46.288+08:00",
|
|
|
- "customerFromName": "自然客流",
|
|
|
- "tSumStandard": 136641,
|
|
|
- "discountStandard": 299.14,
|
|
|
- "tSumAmount": 408752,
|
|
|
- "flgToErp": false,
|
|
|
- "sumFeeAmount": 0,
|
|
|
- "orderAnnexPaths": [],
|
|
|
- "receivable": 408752,
|
|
|
- "usablePrestore": 0,
|
|
|
- "makingUserName": "无库无ERP00001",
|
|
|
- "tDiscountPromotion": 431.39,
|
|
|
- "addressNo": "1211代送客户测试001",
|
|
|
- "salesChannelName": "零售",
|
|
|
- "tSumQuantity": 33,
|
|
|
- "addressName": "辽宁省林业和草原局",
|
|
|
- "sumVolume": 2.79,
|
|
|
- "staffId": 643,
|
|
|
- "addressArea": {
|
|
|
- "city": "沈阳市",
|
|
|
- "district": "和平区",
|
|
|
- "province": "辽宁省"
|
|
|
- },
|
|
|
- "sumPromotion": 94752,
|
|
|
- "serviceType": 1,
|
|
|
- "serviceTypeName": "送安一体",
|
|
|
- "autoOutFlg": false,
|
|
|
- "sumOutGoingAmount": 408752,
|
|
|
- "sumOutGoingQuantity": 33,
|
|
|
- "categoryQuantity": 1
|
|
|
+ relation: [{
|
|
|
+ code: 'orderNo',
|
|
|
+ name: 'orderNo',
|
|
|
+ type: 'choose',
|
|
|
+ controlChooseFlag: true,
|
|
|
+ title: mixins.$t("sourceOrder"),//'关联源单'
|
|
|
+ urlKey: 'choosePurchaseOrder'
|
|
|
+ }],
|
|
|
+ items: [
|
|
|
+ { code: 'collectType', name: 'collectName', type: 'drop', required: true, dropType: 'collect' },
|
|
|
+ { code: 'collectAmount', type: 'number', title: mixins.$t("amountCollected"), required: true }
|
|
|
+ ],
|
|
|
+ other: [
|
|
|
+ { code: 'contractNo', type: 'textarea', title: mixins.$t("contractNumber"), readonly: false },
|
|
|
+ { code: 'deliveryDate', type: 'date', required: false, title: mixins.$t("delivery_Time"), required: true },
|
|
|
+ { code: 'remarks', type: 'textarea', title: mixins.$t("remarks"), readonly: false },
|
|
|
+ { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
|
|
|
+ ]
|
|
|
},
|
|
|
- goodsList: [
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 1,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 100,
|
|
|
- "discountStandard": 11.24,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "iconThumPath": "haip/2023-04-21/19ae78a2639547d9aa961b58d20dbdbd.png",
|
|
|
- "id": "1479b100-c70c-437b-9039-3e598cdb0522",
|
|
|
- "itemAmount": 999,
|
|
|
- "itemIndex": 1,
|
|
|
- "ivtQty": 3,
|
|
|
- "nonStandardArea": 1,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 999,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36176,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 999,
|
|
|
- "orderQuantity": 1,
|
|
|
- "outGoingAmount": 999,
|
|
|
- "outGoingQty": 3,
|
|
|
- "outGoingQuantity": 1,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "pricePromotion": 999,
|
|
|
- "priceStandard": 8888,
|
|
|
- "promotionId": 211,
|
|
|
- "promotionItemId": 22944,
|
|
|
- "promotionName": "1",
|
|
|
- "promotionPriceType": 77,
|
|
|
- "promotionPriceTypeName": "爆款产品",
|
|
|
- "promotionType": 1,
|
|
|
- "promotionTypeName": "单品促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "EE920A00200B01",
|
|
|
- "skuId": 9537580,
|
|
|
- "skuModel": "HE920",
|
|
|
- "skuName": "【已淘汰】智能盖板HE920",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.05,
|
|
|
- "skuWeight": 0,
|
|
|
- "spuCode": "HE920",
|
|
|
- "spuId": 65410,
|
|
|
- "standardId": 308,
|
|
|
- "tItemAmount": 999,
|
|
|
- "tItemQuantity": 1,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "usableQty": 0,
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "bomSkuCode": "CY901DT2200B01",
|
|
|
- "bomSkuId": 161052,
|
|
|
- "canOutQuantity": 1,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 100,
|
|
|
- "discountStandard": 100,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "5ea261c3-1f36-4a69-b898-940979b805f5",
|
|
|
- "itemAmount": 3303,
|
|
|
- "itemIndex": 2,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 3303,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36177,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 3303,
|
|
|
- "orderQuantity": 1,
|
|
|
- "outGoingAmount": 3303,
|
|
|
- "outGoingQuantity": 1,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
|
|
|
- "pricePromotion": 3303,
|
|
|
- "priceStandard": 3303,
|
|
|
- "promotionName": "",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 0,
|
|
|
- "promotionTypeName": "正常品",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "CT901DT2200B01",
|
|
|
- "skuId": 9605810,
|
|
|
- "skuName": "落地式坐便器HC0901DT\\地排305\\无盖板",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.235,
|
|
|
- "skuWeight": 0,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213129,
|
|
|
- "tItemAmount": 3303,
|
|
|
- "tItemQuantity": 1,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "bomSkuCode": "CY901DT2200B01",
|
|
|
- "bomSkuId": 161052,
|
|
|
- "canOutQuantity": 1,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 100,
|
|
|
- "discountStandard": 100,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "bac1205c-a2de-4ed7-808c-b9be59070153",
|
|
|
- "itemAmount": 4450,
|
|
|
- "itemIndex": 3,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 4450,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36178,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 4450,
|
|
|
- "orderQuantity": 1,
|
|
|
- "outGoingAmount": 4450,
|
|
|
- "outGoingQuantity": 1,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
|
|
|
- "pricePromotion": 4450,
|
|
|
- "priceStandard": 4450,
|
|
|
- "promotionName": "",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 0,
|
|
|
- "promotionTypeName": "正常品",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "CQ501000000N01",
|
|
|
- "skuId": 9607630,
|
|
|
- "skuName": "电控盖板HQ501",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.063,
|
|
|
- "skuWeight": 0,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213130,
|
|
|
- "tItemAmount": 4450,
|
|
|
- "tItemQuantity": 1,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 10,
|
|
|
- "combinedSpecsId": 68,
|
|
|
- "combinedTypeId": 462,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 465.12,
|
|
|
- "discountStandard": 186.05,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "iconThumPath": "haip/2023-10-04/ded5bc0e7a9446cc831dd831b6b6bc47.png",
|
|
|
- "id": "b7558b1f-0b9e-4dce-9846-c5e6ea993e96",
|
|
|
- "itemAmount": 27907,
|
|
|
- "itemIndex": 4,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 27907,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36180,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 2790.7,
|
|
|
- "orderQuantity": 10,
|
|
|
- "outGoingAmount": 27907,
|
|
|
- "outGoingQuantity": 10,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
|
|
|
- "pricePromotion": 600,
|
|
|
- "priceStandard": 1500,
|
|
|
- "promotionId": 273,
|
|
|
- "promotionItemId": 598,
|
|
|
- "promotionName": "1115新活动",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 2,
|
|
|
- "promotionTypeName": "组合促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "FF1016000CHB0A",
|
|
|
- "skuId": 9418430,
|
|
|
- "skuModel": "HMF101-150",
|
|
|
- "skuName": "【已淘汰】面盆龙头HMF101-150\\壁式暗装\\单柄双控\\翻板式下水器",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.05,
|
|
|
- "skuWeight": 128,
|
|
|
- "spuCode": "HMF101-150",
|
|
|
- "spuId": 6938,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213154,
|
|
|
- "tItemAmount": 27907,
|
|
|
- "tItemQuantity": 10,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- },
|
|
|
+ //按钮
|
|
|
+ buttonSaveList: [
|
|
|
+ { code: 'collection', title: mixins.$t("collection"), width: '120rpx', color: '#CAA977' },
|
|
|
+ { code: 'save', title: mixins.$t("save"), width: '120rpx', color: '#1B365D' }
|
|
|
+ ],
|
|
|
+ contentSaveList: [
|
|
|
+ { code: 'flag', title: mixins.$t("saleOutBoundFlag"), type: 'checkbox' },
|
|
|
+ { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
|
|
|
+ { code: 'receivable', content: 0, type: 'number' }
|
|
|
+ ],
|
|
|
+ popContent: [
|
|
|
+ { code: 'itemQty', type: 'step', title: mixins.$t("count"), required: true },
|
|
|
+ { code: 'priceSale', type: 'number', title: mixins.$t("priceSale"), required: true },
|
|
|
{
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 10,
|
|
|
- "combinedSpecsId": 67,
|
|
|
- "combinedTypeId": 457,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 465.12,
|
|
|
- "discountStandard": 372.09,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "32a7c7ba-5572-485e-a895-96b6ddf18219",
|
|
|
- "itemAmount": 93023.3,
|
|
|
- "itemIndex": 5,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 93023.3,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36181,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 9302.33,
|
|
|
- "orderQuantity": 10,
|
|
|
- "outGoingAmount": 93023.3,
|
|
|
- "outGoingQuantity": 10,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
|
|
|
- "pricePromotion": 2000,
|
|
|
- "priceStandard": 2500,
|
|
|
- "promotionId": 273,
|
|
|
- "promotionItemId": 587,
|
|
|
- "promotionName": "1115新活动",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 2,
|
|
|
- "promotionTypeName": "组合促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "FB1033000CHB0A",
|
|
|
- "skuId": 9571300,
|
|
|
- "skuName": "【已淘汰】淋浴大花洒HMF103-333M\\壁式明装\\三功能",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 0.6,
|
|
|
- "skuWeight": 187,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213151,
|
|
|
- "tItemAmount": 93023.3,
|
|
|
- "tItemQuantity": 10,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
+ code: 'whId', name: 'whName', title: mixins.$t("warehouseId"), type: 'choose', urlKey: 'openingInventory',
|
|
|
},
|
|
|
- {
|
|
|
- "activityId": 84,
|
|
|
- "activityName": "零售活动方案",
|
|
|
- "canOutQuantity": 10,
|
|
|
- "combinedSpecsId": 64,
|
|
|
- "combinedTypeId": 456,
|
|
|
- "cpId": 20760,
|
|
|
- "discountPromotion": 465.12,
|
|
|
- "discountStandard": 348.84,
|
|
|
- "flgDesign": false,
|
|
|
- "flgGift": false,
|
|
|
- "flgNonStandardType": 0,
|
|
|
- "hasChild": 0,
|
|
|
- "id": "e4b95f3f-6a46-416f-a817-8c1176cbe541",
|
|
|
- "itemAmount": 279069.7,
|
|
|
- "itemIndex": 6,
|
|
|
- "nonStandardCode": "-",
|
|
|
- "orderAmount": 279069.7,
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemId": 36182,
|
|
|
- "orderItemQuantity": 1,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderPriceSale": 27906.97,
|
|
|
- "orderQuantity": 10,
|
|
|
- "outGoingAmount": 279069.7,
|
|
|
- "outGoingQuantity": 10,
|
|
|
- "outQuantity": 0,
|
|
|
- "outStatus": 2,
|
|
|
- "outStatusString": "未出库",
|
|
|
- "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
|
|
|
- "pricePromotion": 6000,
|
|
|
- "priceStandard": 8000,
|
|
|
- "promotionId": 273,
|
|
|
- "promotionItemId": 586,
|
|
|
- "promotionName": "1115新活动",
|
|
|
- "promotionPriceType": -2,
|
|
|
- "promotionPriceTypeName": "正价产品",
|
|
|
- "promotionType": 2,
|
|
|
- "promotionTypeName": "组合促销",
|
|
|
- "rejectQuantity": 0,
|
|
|
- "skuCode": "CT962EN2200B01",
|
|
|
- "skuId": 9553940,
|
|
|
- "skuModel": "HC0962",
|
|
|
- "skuName": "智能一体机陶瓷体HC0962\\地排305",
|
|
|
- "skuSpecs": " ",
|
|
|
- "skuType": 0,
|
|
|
- "skuTypeName": "",
|
|
|
- "skuVolume": 2.09,
|
|
|
- "skuWeight": 0,
|
|
|
- "spuCode": "HC0962",
|
|
|
- "spuId": 27537,
|
|
|
- "standardId": 308,
|
|
|
- "standardItemId": 213149,
|
|
|
- "tItemAmount": 279069.7,
|
|
|
- "tItemQuantity": 10,
|
|
|
- "titleTag": "HEGII",
|
|
|
- "unitName": "PCS",
|
|
|
- "whId": 552,
|
|
|
- "whName": "钦州运营仓"
|
|
|
- }
|
|
|
+ { code: 'nonStdCode', title: mixins.$t("goodsBatch"), type: 'str', },
|
|
|
+ { code: 'flgGift', title: mixins.$t("flgGift"), type: 'checkbox', },
|
|
|
],
|
|
|
- isStockUp: false,
|
|
|
- item: {
|
|
|
- "addressArea": {
|
|
|
- "city": "沈阳市",
|
|
|
- "district": "和平区",
|
|
|
- "province": "辽宁省"
|
|
|
- },
|
|
|
- "addressFull": "辽宁省沈阳市和平区辽宁省林业和草原局1211代送客户测试001",
|
|
|
- "addressGcj02": {
|
|
|
- "latitude": 41.803274,
|
|
|
- "longitude": 123.408179
|
|
|
- },
|
|
|
- "addressName": "辽宁省林业和草原局",
|
|
|
- "addressNo": "1211代送客户测试001",
|
|
|
- "ageComposition": null,
|
|
|
- "ageCompositionName": null,
|
|
|
- "apvResult": "审-通过",
|
|
|
- "apvResultName": "通过",
|
|
|
- "apvSubmitId": null,
|
|
|
- "apvUserIds": [],
|
|
|
- "ascpId": 29195,
|
|
|
- "bankAccount": null,
|
|
|
- "bankDeposit": null,
|
|
|
- "categoryQuantity": 1,
|
|
|
- "channelName": null,
|
|
|
- "contactName": "",
|
|
|
- "deliveryPhone": "",
|
|
|
- "contractNo": null,
|
|
|
- "cpId": 20760,
|
|
|
- "crmOrderNo": null,
|
|
|
- "customerCode": "68888184848-100304",
|
|
|
- "customerFrom": -1,
|
|
|
- "customerFromName": null,
|
|
|
- "customerId": 3892,
|
|
|
- "customerName": "1211代送客户测试001",
|
|
|
- "customerPhone": "68888184848",
|
|
|
- "customerType": null,
|
|
|
- "customerTypeName": null,
|
|
|
- "decisionMaker": null,
|
|
|
- "decisionMakerName": null,
|
|
|
- "deliveryTime": "2024-01-30 08:00:00",
|
|
|
- "deliveryTypeName": null,
|
|
|
- "designRemarks": null,
|
|
|
- "designStatus": "设计状态-无需",
|
|
|
- "designStatusName": "不需要设计",
|
|
|
- "designUser": null,
|
|
|
- "designUserName": null,
|
|
|
- "discountPromotion": 431.39,
|
|
|
- "discountStandard": 299.14,
|
|
|
- "displayStatus": "成交",
|
|
|
- "docCode": "销售订单",
|
|
|
- "earnestAmount": null,
|
|
|
- "editTime": "2024-01-29 10:09:46",
|
|
|
- "entryStatus": "入库状态-未入",
|
|
|
- "entryTime": null,
|
|
|
- "erpOrgCode": "",
|
|
|
- "erpPushResult": null,
|
|
|
- "erpPushStatus": 2,
|
|
|
- "estateId": null,
|
|
|
- "estateName": null,
|
|
|
- "fitupStyle": null,
|
|
|
- "fitupStyleName": null,
|
|
|
- "fitupType": null,
|
|
|
- "fitupTypeName": null,
|
|
|
- "flgValid": true,
|
|
|
- "houseType": null,
|
|
|
- "houseTypeName": null,
|
|
|
- "kujialeDesignId": null,
|
|
|
- "kujialeNo": null,
|
|
|
- "kujialePricePaths": null,
|
|
|
- "makingTime": "2024/01/29",
|
|
|
- "makingTimeConvert": "2024-01-29 10:09:46",
|
|
|
- "makingUser": 1005,
|
|
|
- "makingUserName": "无库无ERP00001",
|
|
|
- "merOrderType": 0,
|
|
|
- "merOrderTypeName": "非跟单",
|
|
|
- "orderId": 11981,
|
|
|
- "orderItemVOList": null,
|
|
|
- "orderNo": "SA-QZHJ-BFJ-202401290SAY",
|
|
|
- "orderStatus": "订单状态-通过",
|
|
|
- "orderStatusName": "成交",
|
|
|
- "orderType": 2,
|
|
|
- "orgCode": "GXBH1002",
|
|
|
- "orgId": 32402,
|
|
|
- "orgList": null,
|
|
|
- "orgName": "北海富安居店",
|
|
|
- "outStatus": "出库状态-未出",
|
|
|
- "outStatusName": "未出库",
|
|
|
- "receiptStatus": "收款状态-未收",
|
|
|
- "receiptStatusName": "未收款",
|
|
|
- "receivable": 408752,
|
|
|
- "rejectStatusString": null,
|
|
|
- "remarks": null,
|
|
|
- "sale1Id": 20760,
|
|
|
- "sale2Id": 29195,
|
|
|
- "sale2OpeMode": "分销模式-代送",
|
|
|
- "salesChannel": 1,
|
|
|
- "salesChannelName": "零售",
|
|
|
- "sorderId": null,
|
|
|
- "sorderNo": null,
|
|
|
- "staffCode": "12222222222@QZHJ",
|
|
|
- "staffId": 1005,
|
|
|
- "staffList": null,
|
|
|
- "staffName": "无库无ERP00001",
|
|
|
- "storeCode": "GXBH1002",
|
|
|
- "storeId": 4421,
|
|
|
- "storeName": "北海富安居店",
|
|
|
- "storeType": null,
|
|
|
- "storeTypeName": "直营门店",
|
|
|
- "sumAmount": 408752,
|
|
|
- "sumCollectedAmount": 0,
|
|
|
- "sumFeeAmount": 0,
|
|
|
- "sumGoodsAmount": 408752,
|
|
|
- "sumOutAmount": 0,
|
|
|
- "sumPromotion": 94752,
|
|
|
- "sumQuantity": 33,
|
|
|
- "sumReceiptAmount": 0,
|
|
|
- "sumRejectAmount": 0,
|
|
|
- "sumStandard": 136641,
|
|
|
- "sumUsePrestore": 0,
|
|
|
- "sumVolume": 2.79,
|
|
|
- "sumWeight": 315,
|
|
|
- "supplierCode": null,
|
|
|
- "supplierId": null,
|
|
|
- "supplierName": null,
|
|
|
- "tdiscountPromotion": 431.39,
|
|
|
- "tdiscountStandard": 299.14,
|
|
|
- "toiletCount": null,
|
|
|
- "toiletCountName": null,
|
|
|
- "tsumAmount": 408752,
|
|
|
- "tsumGoodsAmount": 408752,
|
|
|
- "tsumPromotion": 94752,
|
|
|
- "tsumQuantity": 33,
|
|
|
- "tsumStandard": 136641
|
|
|
- },
|
|
|
- orgItem: {
|
|
|
- "text": "",
|
|
|
- "value": null
|
|
|
- },
|
|
|
- showcheckbox: false,
|
|
|
- staffItem: {
|
|
|
- "text": "选择业务员",
|
|
|
- "value": null
|
|
|
- },
|
|
|
- tags: [],
|
|
|
- whNameFlag: false,
|
|
|
- loading: false,
|
|
|
- orderAnnexPaths: [],
|
|
|
- orderfileList: []
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 输入事件监听
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年9月12日
|
|
|
- */
|
|
|
- changeField(e) {
|
|
|
- let key = e.currentTarget.dataset.key
|
|
|
- let form = this.data.form
|
|
|
- form[key] = e.detail
|
|
|
- this.setData({
|
|
|
- form,
|
|
|
- })
|
|
|
- },
|
|
|
- /** 跳转选择库区*/
|
|
|
- toChooseWhName(e) {
|
|
|
- if (this.data.form.sale2OpeMode == "分销模式-代送") {
|
|
|
- return
|
|
|
- }
|
|
|
- wx.navigateTo({
|
|
|
- url: '/package6/pages/choose-product/choose-product?sourcePage=' + 'sales-outbound-detail' + '&title=新建销售出库' + "&item=" + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + "&ascpId=" + this.data.form.ascpId,
|
|
|
- })
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 商品数量编辑
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月24日
|
|
|
- */
|
|
|
- changeAllreadyChooseQuantityPop(e) {
|
|
|
- let currentChoosedItem = this.data.currentChoosedItem
|
|
|
- currentChoosedItem.outGoingQuantity = e.detail
|
|
|
- //非标品 带面积的 要成面积
|
|
|
- if (currentChoosedItem.nonStandardArea) {
|
|
|
- currentChoosedItem.itemAmount = Number(currentChoosedItem.orderPriceSale * currentChoosedItem.outGoingQuantity * res.nonStandardArea).toFixed(2)
|
|
|
- } else {
|
|
|
- currentChoosedItem.itemAmount = Number(currentChoosedItem.orderPriceSale * currentChoosedItem.outGoingQuantity).toFixed(2)
|
|
|
- }
|
|
|
- this.setData({
|
|
|
- currentChoosedItem: currentChoosedItem
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 选择送货人
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- changeDeliveryMan() {
|
|
|
- // this.getContactData()
|
|
|
- this.setData({
|
|
|
- DeliveryManFlag: true
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 选择安装员
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- changeInstaller() {
|
|
|
- // this.getContactData()
|
|
|
- this.setData({
|
|
|
- InstallerFlag: true
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 确定修改
|
|
|
+ * @desc : 打开商品事件
|
|
|
* @author : 于继渤
|
|
|
- * @date : 2022/5/26 12:16
|
|
|
+ * @date : 2024/1/26 11:46
|
|
|
*/
|
|
|
- updateToChooseList(e) {
|
|
|
- var goodsList = this.data.goodsList
|
|
|
- var index = this.data.ProductIndex
|
|
|
- var currentChoosedItem = this.data.currentChoosedItem
|
|
|
- goodsList[index].nonGlassList = []
|
|
|
- goodsList[index].nonGlassListShow = ''
|
|
|
-
|
|
|
- //校验商品数量
|
|
|
- if (currentChoosedItem.outGoingQuantity <= 0) {
|
|
|
- wx.showToast({
|
|
|
- title: '待出库数量不能为0',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (currentChoosedItem.outQuantity > currentChoosedItem.outGoingQuantity) {
|
|
|
- wx.showToast({
|
|
|
- title: '本次出库量不能大于待出库量',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.data.form.sale2OpeMode != "分销模式-代送") {
|
|
|
- if (currentChoosedItem.usableQty < currentChoosedItem.outGoingQuantity) {
|
|
|
- wx.showToast({
|
|
|
- title: "当前商品库存可售量不足,无法出库",
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- //非标定制品标价参数赋值
|
|
|
- if (currentChoosedItem.nonStandardList && currentChoosedItem.nonStandardList.length > 0) {
|
|
|
- let nonStandardList = util.copyObj(currentChoosedItem.nonStandardList)
|
|
|
- let nonStandardObjList = []
|
|
|
- nonStandardList.forEach(res => {
|
|
|
- let nonStandardObj = {
|
|
|
- fieldId: null,
|
|
|
- fieldCode: null,
|
|
|
- fieldName: null,
|
|
|
- optionCode: null,
|
|
|
- optionName: null,
|
|
|
- }
|
|
|
- nonStandardObj.fieldId = res.fieldId
|
|
|
- nonStandardObj.fieldCode = res.fieldCode
|
|
|
- nonStandardObj.fieldName = res.fieldName
|
|
|
- nonStandardObj.isScope = res.isScope
|
|
|
- //判断是否是范围值
|
|
|
- if (res.isScope == 1) {
|
|
|
- nonStandardObj.optionCode = res.optionCode
|
|
|
- nonStandardObj.optionName = res.optionName
|
|
|
- }
|
|
|
- if (res.options && res.options.length > 0) {
|
|
|
- res.options.forEach(it => {
|
|
|
- if (it.infotype == 'info') {
|
|
|
- nonStandardObj.optionCode = it.code
|
|
|
- nonStandardObj.optionName = it.name
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- //没有选择的参数不会设置
|
|
|
- if (nonStandardObj.optionCode) {
|
|
|
- nonStandardObjList.push(nonStandardObj)
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- currentChoosedItem.nonGlassList = nonStandardObjList //订单明细字段
|
|
|
-
|
|
|
- goodsList[index].nonGlassList = nonStandardObjList
|
|
|
- //设置显示非标参数 (展示非标text)
|
|
|
- if (nonStandardObjList && nonStandardObjList.length > 0) {
|
|
|
- let nonGlassListShowTemp = []
|
|
|
- nonStandardObjList.forEach(it => {
|
|
|
- nonGlassListShowTemp.push(it.fieldName + ':' + it.optionName)
|
|
|
- })
|
|
|
- //非标参数显示/匹配命中标价的数据
|
|
|
- // currentChoosedItem.nonGlassListShow =[]
|
|
|
- currentChoosedItem.nonGlassListShow = nonGlassListShowTemp.join(',')
|
|
|
- goodsList[index].nonGlassListShow = nonGlassListShowTemp.join(',')
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- goodsList[index].nonStandardList = currentChoosedItem.nonStandardList
|
|
|
- goodsList[index].priceStandard = currentChoosedItem.priceStandard
|
|
|
- }
|
|
|
- goodsList[index].outGoingQuantity = currentChoosedItem.outGoingQuantity
|
|
|
- goodsList[index].itemQuantity = currentChoosedItem.itemQuantity //商品数量
|
|
|
- goodsList[index].outQuantity = currentChoosedItem.outQuantity
|
|
|
- goodsList[index] = Object.assign({}, goodsList[index], currentChoosedItem); //2023年10月30日 把选择得商品 覆盖当前商品对应得值
|
|
|
- if (currentChoosedItem.flgNonStandardType == 1 || currentChoosedItem.flgNonStandardType == 2) {
|
|
|
- goodsList[index].nonStandardArea = currentChoosedItem.nonStandardArea //面积
|
|
|
- }
|
|
|
-
|
|
|
- goodsList[index].usedLocation = currentChoosedItem.usedLocation //使用位置
|
|
|
- goodsList[index].orderPriceSalet = currentChoosedItem.orderPriceSalet //销售价格
|
|
|
- goodsList[index].flgGift = currentChoosedItem.flgGift //赠品标识
|
|
|
- goodsList[index].nonstandardRemarks = currentChoosedItem.nonstandardRemarks //非标备注
|
|
|
- goodsList[index].remarks = currentChoosedItem.remarks //备注
|
|
|
- goodsList[index].itemAmount = currentChoosedItem.itemAmount //销售金额
|
|
|
- goodsList[index].discountPromotion = currentChoosedItem.discountPromotion //标准售价折扣
|
|
|
- goodsList[index].discountStandard = currentChoosedItem.discountStandard //标价折扣
|
|
|
- if (goodsList[index].goodsSkuList && goodsList[index].goodsSkuList.length > 0) {
|
|
|
-
|
|
|
- goodsList[index].goodsSkuList.forEach(res => {
|
|
|
- if (currentChoosedItem.flgGift) {
|
|
|
- res.orderPriceSalet = 0
|
|
|
- }
|
|
|
- res.warehouseId = currentChoosedItem.warehouseId ? currentChoosedItem.warehouseId : null
|
|
|
- res.warehouseName = currentChoosedItem.warehouseName ? currentChoosedItem.warehouseName : null
|
|
|
- res.whId = currentChoosedItem.whId ? currentChoosedItem.whId : null
|
|
|
- res.whId_Name = currentChoosedItem.warehouseName ? currentChoosedItem.warehouseName : null
|
|
|
- res.itemQuantity = currentChoosedItem.itemQuantity * res.orderItemQuantity
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- //使用位置标签功能↓↓↓↓↓
|
|
|
- let tags = this.data.tags
|
|
|
- for (let i = 0; i < tags.length; i++) {
|
|
|
- if (tags[i].usedLocation === currentChoosedItem.usedLocation) {
|
|
|
- tags.splice(i, 1)
|
|
|
- }
|
|
|
- }
|
|
|
- if (currentChoosedItem.usedLocation) {
|
|
|
- currentChoosedItem.usedLocation.replace(/\s*/g, "");
|
|
|
- }
|
|
|
- if (goodsList[index].usedLocation == undefined || goodsList[index].usedLocation == '' || currentChoosedItem.usedLocation.trim() == '') {
|
|
|
-
|
|
|
- } else {
|
|
|
- tags.push({
|
|
|
- usedLocation: currentChoosedItem.usedLocation
|
|
|
- })
|
|
|
- for (let i = 0; i < goodsList.length; i++) {
|
|
|
- //列表后五个
|
|
|
- if (i >= index && goodsList[i].usedLocation == undefined) {
|
|
|
- goodsList[i].usedLocation = currentChoosedItem.usedLocation
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (currentChoosedItem.outQuantity == currentChoosedItem.outGoingQuantity) {
|
|
|
- goodsList[index].checked = true
|
|
|
- } else {
|
|
|
- goodsList[index].checked = false
|
|
|
- }
|
|
|
- //使用位置标签功能↑↑↑↑↑↑↑
|
|
|
- this.setData({
|
|
|
- tags: tags,
|
|
|
- goodsList: goodsList,
|
|
|
- showEditProduct: false
|
|
|
- })
|
|
|
- if (!currentChoosedItem.flgGift) {
|
|
|
- this.handleData(goodsList)
|
|
|
- }
|
|
|
-
|
|
|
- this.setData({
|
|
|
- EditProduct_priceSale_temp: null
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- // 更新组合中的隐藏的bom信息
|
|
|
- this.updateBomCombined(goodsList[index].goodsSkuList, currentChoosedItem)
|
|
|
- let num = 0
|
|
|
- this.data.goodsList.forEach(function (res, index) {
|
|
|
- if ((!res.usableQty) || (res.usableQty && (res.usableQty < res.outGoingQuantity))) {
|
|
|
- num++
|
|
|
- }
|
|
|
- })
|
|
|
- if (num > 0) {
|
|
|
- this.setData({
|
|
|
- isStockUp: false
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.setData({
|
|
|
- isStockUp: true
|
|
|
- })
|
|
|
- }
|
|
|
- this.countGoodsList(goodsList)
|
|
|
- }, 300)
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 更新组合中BOM数量等
|
|
|
- * @author : 周兴
|
|
|
- * @date : 2022/9/20 18:16
|
|
|
- */
|
|
|
- updateBomCombined(goodsSkuList, pRow) {
|
|
|
- if (goodsSkuList && goodsSkuList.length > 0) {
|
|
|
- let filterRows = goodsSkuList.filter(it => it.bomSkuCombined && it.bomSkuCombined.length > 0);
|
|
|
- if (filterRows && filterRows.length > 0) {
|
|
|
- filterRows.forEach(it => {
|
|
|
- // 数量
|
|
|
- it.itemQuantity = Number(pRow.itemQuantity) * Number(it.orderItemQuantity)
|
|
|
- let bomSkuCombined = it.bomSkuCombined;
|
|
|
- let itemAmount = 0;
|
|
|
- let sumVolume = 0;
|
|
|
- let sumWeight = 0;
|
|
|
- let skuVolume = 0;
|
|
|
- let skuWeight = 0;
|
|
|
- bomSkuCombined.forEach(t => {
|
|
|
- let rows = goodsSkuList.filter(row => row.id == t);
|
|
|
- if (rows && rows.length > 0) {
|
|
|
- skuVolume = Number(rows[0].skuVolume) * Number(rows[0].itemQuantity);
|
|
|
- sumVolume += skuVolume;
|
|
|
- skuWeight = Number(rows[0].skuWeight) * Number(rows[0].itemQuantity);
|
|
|
- sumWeight += skuWeight;
|
|
|
- if (rows[0].itemQuantity && rows[0].priceSale) {
|
|
|
- itemAmount += Number(rows[0].itemQuantity) * Number(rows[0].priceSale);
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- it.skuVolume = sumVolume;
|
|
|
- it.skuWeight = sumWeight;
|
|
|
- it.itemAmount = itemAmount;
|
|
|
- it.priceSale = it.itemQuantity == 0 ? 0 : (itemAmount / it.itemQuantity).toFixed(2)
|
|
|
- it.discountPromotion = it.pricePromotion == 0 ? 0 : Number((it.priceSale * 100 / it.pricePromotion).toFixed(2));
|
|
|
- it.discountStandard = it.priceStandard == 0 ? 0 : Number((it.priceSale * 100 / it.priceStandard).toFixed(2));
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ openChoosedItemInfo(e) {
|
|
|
+ console.log('openChoosedItemInfo', e)
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 处理数据
|
|
|
- * @author : 于继渤
|
|
|
- * @date : 2022/5/31 18:16
|
|
|
- */
|
|
|
- handleData(goodsList) {
|
|
|
- let followFlag = this.data.followFlag;
|
|
|
- if (goodsList != null && goodsList.length > 0) {
|
|
|
- goodsList.forEach(it => {
|
|
|
- // 跟单处理为实际量
|
|
|
- if (followFlag) {
|
|
|
- it.tItemQuantity = it.itemQuantity
|
|
|
- it.tItemAmount = it.itemAmount
|
|
|
- }
|
|
|
- // ***如果有子级,需要处理子级的数据
|
|
|
- if (it.bomItems != null && it.bomItems.length > 0) {
|
|
|
-
|
|
|
- it.bomItems.forEach(row => {
|
|
|
- row.warehouseId = it.warehouseId ? it.warehouseId : null
|
|
|
- row.warehouseName = it.warehouseName ? it.warehouseName : null
|
|
|
- row.whId_Name = it.warehouseName ? it.warehouseName : null
|
|
|
- row.whId = it.whId ? it.whId : null
|
|
|
- // 数量的处理
|
|
|
- if (followFlag) {
|
|
|
- row.tItemQuantity = it.itemQuantity * row.orderItemQuantity
|
|
|
- } else {
|
|
|
- row.itemQuantity = it.itemQuantity * row.orderItemQuantity
|
|
|
- }
|
|
|
- // 如果单品促销
|
|
|
- if (it.promotionType == Constants.PROMOTION_TYPE.PRMOTION ||
|
|
|
- it.promotionType == Constants.PROMOTION_TYPE.COMBINED) {
|
|
|
- it.pricePromotion = it.pricePromotion ? it.pricePromotion : 0;
|
|
|
- if (it.pricePromotion == 0) {
|
|
|
- row.priceSale = 0
|
|
|
- } else {
|
|
|
- // 销售价(子级)= 销售价(父级)/ 标售售价(父级)* 标售售价(子级)
|
|
|
- row.priceSale = Number(it.priceSale / it.pricePromotion * row.pricePromotion).toFixed(2)
|
|
|
- }
|
|
|
- } else {
|
|
|
- it.priceStandard = it.priceStandard ? it.priceStandard : 0;
|
|
|
- // 正常品
|
|
|
- if (it.priceStandard == 0) {
|
|
|
- row.priceSale = 0
|
|
|
- } else {
|
|
|
- // 销售价(子级)= 销售价(父级)/ 标售售价(父级)* 标售售价(子级)
|
|
|
- row.priceSale = Number(it.priceSale / it.priceStandard * row.priceStandard).toFixed(2)
|
|
|
- }
|
|
|
- }
|
|
|
- if (followFlag) {
|
|
|
- row.tItemAmount = Number(row.priceSale * row.tItemQuantity).toFixed(2)
|
|
|
- } else {
|
|
|
- row.itemAmount = Number(row.priceSale * row.itemQuantity).toFixed(2)
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- it.goodsSkuList = it.bomItems
|
|
|
- }
|
|
|
- // **** 如果有组合促销,需要进行数据的处理
|
|
|
- if (it.combinedList != null && it.combinedList.length > 0) {
|
|
|
- it.hasChild = 1; // 说明有子级
|
|
|
- it.goodsSkuList = []
|
|
|
- it.combinedList.forEach(row => {
|
|
|
- row.warehouseId = it.warehouseId ? it.warehouseId : null
|
|
|
- row.warehouseName = it.warehouseName ? it.warehouseName : null
|
|
|
- row.whId_Name = it.warehouseName ? it.warehouseName : null
|
|
|
- row.whId = it.whId ? it.whId : null
|
|
|
- // 如果没有bom,直接加入到goodsSkuList
|
|
|
- if (row.bomItems == null || row.bomItems.length == 0) {
|
|
|
- if (!row.cpFlgGift) {
|
|
|
- // 重新计算价格
|
|
|
- row.priceSale = this.getCombinedSalePrice(it, row);
|
|
|
- // 重新计算折扣
|
|
|
- this.getCombinedDiscount(row);
|
|
|
- // 计算数量
|
|
|
- row.itemQuantity = Number(it.itemQuantity) * Number(row.orderItemQuantity)
|
|
|
- row.itemAmount = Number(row.itemQuantity) * Number(row.priceSale)
|
|
|
- // 跟单处理为实际量
|
|
|
- if (followFlag) {
|
|
|
- row.tItemQuantity = row.itemQuantity
|
|
|
- row.tItemAmount = row.itemAmount
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- it.goodsSkuList.push(row);
|
|
|
- } else {
|
|
|
- row.bomItems.forEach(ott => {
|
|
|
- ott.warehouseId = it.warehouseId ? it.warehouseId : null
|
|
|
- ott.warehouseName = it.warehouseName ? it.warehouseName : null
|
|
|
- ott.whId_Name = it.warehouseName ? it.warehouseName : null
|
|
|
- ott.whId = it.whId ? it.whId : null
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if (!row.cpFlgGift) {
|
|
|
- row.bomItems.forEach(bRow => {
|
|
|
|
|
|
- // 重新计算价格
|
|
|
- bRow.priceSale = this.getCombinedSalePrice(it, bRow);
|
|
|
- // 重新计算折扣
|
|
|
- this.getCombinedDiscount(bRow);
|
|
|
- // 数量的处理
|
|
|
- bRow.itemQuantity = Number(it.itemQuantity) * Number(bRow.orderItemQuantity)
|
|
|
- bRow.itemAmount = Number(bRow.priceSale) * Number(bRow.itemQuantity).toFixed(2)
|
|
|
- if (followFlag) {
|
|
|
- bRow.tItemQuantity = bRow.itemQuantity
|
|
|
- bRow.tItemAmount = bRow.itemAmount
|
|
|
- }
|
|
|
-
|
|
|
- it.goodsSkuList.push(bRow);
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- // 重新计算最后一条数据的金额,用父级金额-其他条金额合计
|
|
|
- common.countLastAmount(goodsList, false);
|
|
|
|
|
|
- }
|
|
|
- this.setData({
|
|
|
- goodsList: goodsList
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 编辑商品关闭编辑备注事件
|
|
|
- * @author : 于继渤
|
|
|
- * @date : 2022/5/26 12:16
|
|
|
- */
|
|
|
- closeChoosedItemInfo_remark() {
|
|
|
- this.setData({
|
|
|
- remarkFlag: false
|
|
|
- })
|
|
|
- },
|
|
|
/**
|
|
|
- * @desc : 关闭产品
|
|
|
+ * @desc : 计算金额
|
|
|
* @author : 于继渤
|
|
|
- * @date : 2022/5/26 12:16
|
|
|
+ * @date : 2024/1/26 11:46
|
|
|
*/
|
|
|
- closeChoosedItemInfo() {
|
|
|
- this.setData({
|
|
|
- showEditProduct: false,
|
|
|
- currentChoosedItem: []
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 打开商品
|
|
|
- * @author : 于继渤
|
|
|
- * @date : 2022/5/26 12:16
|
|
|
- */
|
|
|
- openChoosedItemInfo(e) {
|
|
|
-
|
|
|
- let item = e.currentTarget.dataset.item
|
|
|
- console.log("weisha a ", item)
|
|
|
- item.itemQuantity = item.outGoingQuantity
|
|
|
- item.usableQty = item.usableQty
|
|
|
- let index = e.currentTarget.dataset.index
|
|
|
- this.setData({
|
|
|
- usedLocation: item.usedLocation,
|
|
|
- ProductIndex: index,
|
|
|
- currentChoosedItem: item,
|
|
|
- showEditProduct: true,
|
|
|
- EditProduct_priceSale_temp: item.itemAmount
|
|
|
- })
|
|
|
+ calculateAmount(goodsItem, index) {
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ if (goodsItem) {
|
|
|
+
|
|
|
+ //设置商品信息
|
|
|
+ goodsItem.amtStd = Number(goodsItem.priceStd * goodsItem.itemQty) //合计标价金额
|
|
|
+ goodsItem.itemAmt = goodsItem.priceSale * goodsItem.itemQty //商品金额
|
|
|
+ goodsItem.priceDiscount = Number((goodsItem.priceSale / goodsItem.priceStd) * 100).toFixed(2)//售价折扣
|
|
|
+ formData.goodsList[index] = goodsItem
|
|
|
+
|
|
|
+ ///设置总单信息
|
|
|
+ let sumStandard = Number(0)
|
|
|
+ let sumAmount = Number(0)
|
|
|
+ let sumQuantity = Number(0)
|
|
|
+ formData.goodsList.forEach(item => {
|
|
|
+ //标价合计 = 商品标价 x 商品数量
|
|
|
+ sumStandard += item.amtStd
|
|
|
+ sumAmount += item.itemAmt //没有售价默认取标价
|
|
|
+ sumQuantity += item.itemQty //数量
|
|
|
|
|
|
- //非标淋浴房
|
|
|
- if ((item.flgNonStandardType == 1 || item.flgNonStandardType == 2) || (item.nonGlassList && item.nonGlassList.length > 0)) {
|
|
|
- // item.nonStandardList = []
|
|
|
- //加载默认spu非标参数数据
|
|
|
- let copyItem = util.copyObj(item)
|
|
|
- this.getFlgNonStandardList(copyItem)
|
|
|
- this.setData({
|
|
|
- show7: true
|
|
|
})
|
|
|
-
|
|
|
- this.getSkuBySpuId(copyItem.spuId)
|
|
|
- this.setData({
|
|
|
- show6: true
|
|
|
- })
|
|
|
- } else {
|
|
|
+ formData.sumStandard = sumStandard
|
|
|
+ formData.saleDiscount = Number((sumAmount / sumStandard) * 100).toFixed(2)
|
|
|
+ formData.sumAmount = sumAmount
|
|
|
+ formData.canUseCollect = 0
|
|
|
+ formData.useCollect = 0
|
|
|
+ formData.sumQuantity = sumQuantity
|
|
|
+ console.log('formData', formData)
|
|
|
this.setData({
|
|
|
- show6: false,
|
|
|
- show7: false
|
|
|
+ formData: JSON.stringify(formData)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- getSkuBySpuId(spuId) {
|
|
|
- let param = {}
|
|
|
- param.spuId = spuId
|
|
|
- param.cpId = app.globalData.user.cpId;
|
|
|
- param.orgId = app.globalData.user.orgId;
|
|
|
- api.request(Constants.GOODS_SPU_SPECS + 'select_sku_by_spu_id', 'POST', param).then(res => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- if (res.data.data.skuData && res.data.data.skuData.length > 0) {
|
|
|
- let list = util.copyObj(res.data.data.skuData)
|
|
|
- let currentChoosedItem = this.data.currentChoosedItem
|
|
|
- list.forEach(it => {
|
|
|
- if (it.skuId == currentChoosedItem.skuId) {
|
|
|
- it.infotype = 'info'
|
|
|
- }
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- skuData: list,
|
|
|
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
/**
|
|
|
- * @desc : 根据spuid查询非标参数
|
|
|
+ * @desc : 选择回调
|
|
|
* @author : 于继渤
|
|
|
- * @date : 2022/8/24 13:16
|
|
|
- */
|
|
|
- getFlgNonStandardList(item) {
|
|
|
- let param = {
|
|
|
- spuId: item.spuId,
|
|
|
- cpId: app.globalData.user.cpId
|
|
|
- }
|
|
|
- api.request(Constants.GOODS_SPU_API + 'get_flg_non_standard_list', 'POST', param).then(res => {
|
|
|
-
|
|
|
- if (res.data.code == 200) {
|
|
|
- let data = res.data.data
|
|
|
- if (data && data.length > 0) {
|
|
|
- data.forEach(item => {
|
|
|
- if (item.options && item.options.value && item.options.value != '[]') {
|
|
|
- item.options = JSON.parse(item.options.value)
|
|
|
- item.options.forEach(it => {
|
|
|
- it.infotype = 'default'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- let dataTemp = util.copyObj(data) //拷贝数据
|
|
|
- let data_nonStandardList = [...data]
|
|
|
- item.nonStandardList = data_nonStandardList
|
|
|
- this.setData({
|
|
|
- nonStandardList: dataTemp
|
|
|
- })
|
|
|
- if (this.data.orderEdit_type == 1) {
|
|
|
- this.setData({
|
|
|
- currentChoosedItem: item,
|
|
|
- })
|
|
|
- //显示查询的参数
|
|
|
- this.setDefault(item)
|
|
|
- } else {
|
|
|
-
|
|
|
- item.nonGlassListShow = ''
|
|
|
- item.nonGlassList = []
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 选择业务员
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- openStaffDropdown() {
|
|
|
-
|
|
|
- return
|
|
|
-
|
|
|
- this.setData({
|
|
|
- staffFlag: true
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 选择业务部门
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
+ * @date : 2024/1/26 11:46
|
|
|
*/
|
|
|
- openOrgDropdown() {
|
|
|
- return
|
|
|
- this.setData({
|
|
|
- orgFlag: true
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 入库处理/入库回退
|
|
|
- * @author : 常皓宁
|
|
|
- * @date : 2023/9/5 8:44
|
|
|
- */
|
|
|
- deal() {
|
|
|
- let data = this.data.item
|
|
|
- Dialog.confirm({
|
|
|
- message: '确认要进行该操作吗?',
|
|
|
- }).then(() => {
|
|
|
- let param = {
|
|
|
- cpId: app.globalData.user.cpId,
|
|
|
- entryId: data.entryId,
|
|
|
- entryWhId: this.data.form.whId,
|
|
|
+ chooseData(e) {
|
|
|
+ console.log('eee1', e);
|
|
|
+ let item = e.detail.data
|
|
|
+ let code = e.detail.code
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ //设置客户信息
|
|
|
+ if (code == 'cusName') {
|
|
|
+ formData.cusCode = item.cusCode
|
|
|
+ formData.cusId = item.cusId
|
|
|
+ formData.cusName = item.cusName
|
|
|
+ formData.cusPhone = item.cusPhone
|
|
|
+ formData.cusFromName = item.cusFromName
|
|
|
+ formData.cusFrom = item.cusFrom
|
|
|
+ //处理地址
|
|
|
+ formData.address = {
|
|
|
+ address: item.addressFull,
|
|
|
+ addressFull: item.addressFull,
|
|
|
+ addressArea: item.addressArea,
|
|
|
+ addressGcj02: item.addressGcj02,
|
|
|
+ addressName: item.addressName,
|
|
|
}
|
|
|
- if (data.entryStatus == 3) {
|
|
|
- api.request(Constants.ORDER_ENTRY_API + 'complete_revocation_entry', 'POST', param).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- wx.showToast({
|
|
|
- title: '提交成功',
|
|
|
- image: '/static/image/success.png',
|
|
|
- duration: 1000
|
|
|
- })
|
|
|
- wx.navigateBack({
|
|
|
- delta: 1
|
|
|
- })
|
|
|
- var pages = getCurrentPages();
|
|
|
- var prevPage = pages[pages.length - 2];
|
|
|
- prevPage.setData({
|
|
|
- entryFlag: true
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- api.request(Constants.ORDER_ENTRY_API + 'purcase_entry_completed', 'POST', param).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- wx.showToast({
|
|
|
- title: '提交成功',
|
|
|
- image: '/static/image/success.png',
|
|
|
- duration: 1000
|
|
|
- })
|
|
|
- wx.navigateBack({
|
|
|
- delta: 1
|
|
|
- })
|
|
|
- var pages = getCurrentPages();
|
|
|
- var prevPage = pages[pages.length - 2];
|
|
|
- prevPage.setData({
|
|
|
- entryFlag: true
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }).catch(() => {});
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 组件单选确定
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年9月5日
|
|
|
- */
|
|
|
- mutiSearch(e) {
|
|
|
- let id = e.target.id
|
|
|
- let form = this.data.form
|
|
|
- if (id === 'staff') { //责任人
|
|
|
- form.staffName = e.detail.name
|
|
|
- form.staffId = e.detail.id
|
|
|
+ formData.addressArea = item.addressArea
|
|
|
+ formData.addressFull = item.addressFull
|
|
|
+ formData.addressGcj02 = item.addressGcj02
|
|
|
+ formData.addressName = item.addressName
|
|
|
+ formData.addressNo = item.addressNo
|
|
|
+ //订单销售渠道 ,默认取的客户的渠道
|
|
|
+ formData.salesChannel = item.channelId
|
|
|
+ formData.channelId = item.channelId
|
|
|
+ formData.channelName = item.channelName
|
|
|
+ formData.contactPhone = item.contactPhone
|
|
|
+ formData.contactPhone = item.contactPhone
|
|
|
}
|
|
|
- if (id === 'org') { //部门
|
|
|
- form.orgName = e.detail.name
|
|
|
- form.orgId = e.detail.id
|
|
|
+ ///设置主从业务员
|
|
|
+ if (code == 'staff') {
|
|
|
+ formData.staff = item.staffItem
|
|
|
+ formData['staffId'] = item.staffMain.staffId
|
|
|
+ formData['staffName'] = item.staffMain.staffName
|
|
|
+ formData['staffList'] = item.staffList
|
|
|
+ console.log(item.staffList)
|
|
|
}
|
|
|
-
|
|
|
- this.setData({
|
|
|
- form,
|
|
|
- staffFlag: false,
|
|
|
- orgFlag: false,
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 服务类型单选下拉打开事件
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- openServiceTypeEvent(e) {
|
|
|
- let type = e.currentTarget.dataset.type
|
|
|
- if (type === 'ServiceType') {
|
|
|
- this.setData({
|
|
|
- serviceTypeFlag: true
|
|
|
- })
|
|
|
+ ///设置主从业务部门
|
|
|
+ if (code == 'org') {
|
|
|
+ console.log('item', item)
|
|
|
+ formData.org = item.orgItem
|
|
|
+ formData['orgId'] = item.orgMain.orgId
|
|
|
+ formData['orgName'] = item.orgMain.orgName
|
|
|
+ formData['orgList'] = item.orgList
|
|
|
}
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 安装员下拉单选确定
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- mutiSearchInstaller(e) {
|
|
|
- let id = e.detail.id
|
|
|
- let name = e.detail.name
|
|
|
- let form = this.data.form
|
|
|
- form.installUser = id
|
|
|
- form.installUserName = name
|
|
|
- this.setData({
|
|
|
- form
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 送装员下拉单选确定
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- mutiSearchDeliveryMan(e) {
|
|
|
- let id = e.detail.id
|
|
|
- let name = e.detail.name
|
|
|
- let form = this.data.form
|
|
|
- form.deliveryUser = id
|
|
|
- form.deliveryUserName = name
|
|
|
this.setData({
|
|
|
- form
|
|
|
+ formData: JSON.stringify(formData)
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
+
|
|
|
/**
|
|
|
- * @desc : 服务类型下拉单选确定
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- mutiSearchserviceType(e) {
|
|
|
- console.log("dashabzxi", e)
|
|
|
- let id = e.detail.id
|
|
|
+ * @desc : 底部按钮事件
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ saveButton(e) {
|
|
|
+ console.log(e)
|
|
|
let name = e.detail.name
|
|
|
- let form = this.data.form
|
|
|
- form.serviceType = id
|
|
|
- form.serviceTypeName = name
|
|
|
- this.setData({
|
|
|
- form
|
|
|
- })
|
|
|
+ if (name == 'save') { //保存
|
|
|
+ this.save({})
|
|
|
+ } else if (name == 'collection') { //收款
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 下拉多选关闭
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月8日
|
|
|
- */
|
|
|
- muticlose(e) {
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc : 设置保存参数
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ setParams(params) {
|
|
|
+ //保存接口并没有计算,因此前台计算
|
|
|
+ let list = this.setItemList(params.goodsList)
|
|
|
+ params.itemList = list //明细
|
|
|
+ params.orderStatus = Constants.orderStatus.STATUS_DEAL //订单状态
|
|
|
+ params.outStatus = Constants.outStatus.unOutBound //出库状态
|
|
|
+ params.makeStaff = app.globalData.user.staffId //制单人
|
|
|
+ params.amtResidue = params.amtReceivable //剩余应收 = 应收金额
|
|
|
+
|
|
|
+ params.deleteItemList = params.deleteList ? params.deleteList : []
|
|
|
+ // params.addressName= params.address.addressName
|
|
|
+ delete params['goodsList']
|
|
|
+ return params
|
|
|
},
|
|
|
/**
|
|
|
- * 生命周期函数--监听页面加载
|
|
|
- */
|
|
|
- onLoad(options) { },
|
|
|
- getCpId() {
|
|
|
- api.request(Constants.SYS_USER_COMPANY_API + "select_company/" + app.globalData.user.sale2Id, 'POST', {}).then(res => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.setData({
|
|
|
- flgToErp: res.data.data.flgToErp
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ * @desc : 明细,保存接口并没有计算,因此前台计算
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ setItemList(list) {
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ list[i].itemIndex = i + 1 //序号
|
|
|
+ }
|
|
|
+ return list
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 删除图片
|
|
|
+ * @desc : 设置商品
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
- * @date : 2022/5/31 18:16
|
|
|
*/
|
|
|
- deleteImg(e) {
|
|
|
- let index = e.detail.index;
|
|
|
- let arr = this.data.fileList;
|
|
|
- arr.splice(index, 1);
|
|
|
+ setGoods(e) {
|
|
|
+ //设置需收款
|
|
|
+ let contentSaveList = this.data.contentSaveList
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ //需收款 = 合计金额 - 使用预存
|
|
|
+ let amtReceivable = Number(formData.sumAmount - formData.useCollect)
|
|
|
+ //组件显示 需收款
|
|
|
+ contentSaveList[2]['content'] = amtReceivable
|
|
|
+ //设置应收金额
|
|
|
+ formData['amtReceivable'] = amtReceivable
|
|
|
this.setData({
|
|
|
- fileList: arr
|
|
|
+ formData: JSON.stringify(formData),
|
|
|
+ contentSaveList: contentSaveList
|
|
|
})
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * @desc : 图片上传
|
|
|
+ * @desc : 保存数据服务
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
- * @date : 2022/5/31 18:16
|
|
|
*/
|
|
|
- afterRead(event) {
|
|
|
- const _this = this;
|
|
|
- const {
|
|
|
- file
|
|
|
- } = event.detail;
|
|
|
- let annexPaths = _this.data.annexPaths || []
|
|
|
- let arr = _this.data.fileList;
|
|
|
- file.forEach(res => {
|
|
|
- // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
- wx.uploadFile({
|
|
|
- url: `${config.server_add}:${config.server_port}` + '/basic-server/file/upload',
|
|
|
- filePath: res.path,
|
|
|
- name: 'file',
|
|
|
- formData: {
|
|
|
- 'folder': 't_order/annex_paths'
|
|
|
- },
|
|
|
- header: {
|
|
|
- 'Authorization': 'Bearer ' + app.globalData.token
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- let data = JSON.parse(res.data)
|
|
|
- if (data.code === 200) {
|
|
|
-
|
|
|
- arr.push({
|
|
|
- url: data.data.absolutelyPath,
|
|
|
- FilePath: data.data.relativePath,
|
|
|
- deletable: true
|
|
|
- })
|
|
|
- let file = data.data.relativePath.split('/')
|
|
|
- annexPaths.push({
|
|
|
- url: data.data.relativePath,
|
|
|
- type: 'image',
|
|
|
- name: file[file.length - 1],
|
|
|
- createTime: util.formatDataTime(new Date())
|
|
|
- })
|
|
|
- _this.setData({
|
|
|
- fileList: arr,
|
|
|
- annexPaths: annexPaths
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- })
|
|
|
+ saveData() {
|
|
|
+ if (this.data.formMode == Constants.formMode.edit) { //编辑
|
|
|
+ return this.excute(this.data.service, this.data.service.update, this.data.params);
|
|
|
+ } else { //新建
|
|
|
+ return this.excute(this.data.service, this.data.service.insert, this.data.params);
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 打开编辑商品备注事件
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月25日
|
|
|
- */
|
|
|
- openRemark(e) {
|
|
|
- this.setData({
|
|
|
- remarksIndex: e.currentTarget.dataset.index,
|
|
|
- remarkFlag: true
|
|
|
- })
|
|
|
- },
|
|
|
- //自动出库办理监听
|
|
|
- onCheckboxChange(event) {
|
|
|
- console.log("onCheckboxChange", event)
|
|
|
- let form = this.data.form
|
|
|
- form.autoOutFlg = event.detail.checked
|
|
|
+ * @desc : 给表单赋值
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ setValuesByEdit(data) {
|
|
|
+ let cardList = this.data.cardList
|
|
|
+ //处理地址
|
|
|
+ data.address = {
|
|
|
+ address: data.addressFull,
|
|
|
+ addressFull: data.addressFull,
|
|
|
+ addressArea: data.addressArea,
|
|
|
+ addressGcj02: data.addressGcj02,
|
|
|
+ addressName: data.addressName,
|
|
|
+ }
|
|
|
+ cardList[1].sumAmount = data.sumAmount
|
|
|
+ cardList[1].sumStandard = data.sumStandard
|
|
|
+ cardList[1].sumQuantity = data.sumQuantity
|
|
|
+ cardList[1].saleDiscount = data.saleDiscount
|
|
|
this.setData({
|
|
|
- form
|
|
|
+ cardList: cardList,
|
|
|
+ formData: JSON.stringify(data)
|
|
|
})
|
|
|
- },
|
|
|
- /**计算商品相关的属性 */
|
|
|
- countGoodsList(List) {
|
|
|
- let goodsList = []
|
|
|
- let sumOutGoingAmount = 0
|
|
|
- let sumOutGoingQuantity = 0
|
|
|
- let that = this
|
|
|
- //
|
|
|
- List.forEach(function (res, index) {
|
|
|
- if (res.bomItems) { //bom品进入 todo先排除这种情况
|
|
|
- res.bomItems.forEach(item => {
|
|
|
- item.itemQuantity = item.bomItemQuantity //入库中数量
|
|
|
- item.outGoingQuantity = item.bomItemQuantity //入库中数量
|
|
|
- item.whId = res.whId //仓库
|
|
|
- item.whName = res.whName //仓库
|
|
|
- item.orderPriceSale = item.orderPriceSale ? item.orderPriceSale : 0 //入库单价
|
|
|
-
|
|
|
- //非标品 带面积的 要成面积
|
|
|
- if (item.nonStandardArea) {
|
|
|
- item.itemAmount = Number(item.orderPriceSale * item.outGoingQuantity * res.nonStandardArea)
|
|
|
- } else {
|
|
|
- item.itemAmount = Number(item.orderPriceSale * item.outGoingQuantity)
|
|
|
- }
|
|
|
- debugger
|
|
|
- sumOutGoingAmount += item.itemAmount
|
|
|
- sumEntryGoingQuantity += item.outGoingQuantity
|
|
|
+ //查询商品明细
|
|
|
+ this.getItemDetal(data.orderId)
|
|
|
|
|
|
- goodsList.push(item)
|
|
|
- })
|
|
|
- } else { //正常品进入
|
|
|
-
|
|
|
- if (res.nonStandardArea) {
|
|
|
- res.itemAmount = Number(res.orderPriceSale * res.outGoingQuantity * res.nonStandardArea)
|
|
|
- } else {
|
|
|
- res.itemAmount = Number(res.orderPriceSale * res.outGoingQuantity)
|
|
|
- }
|
|
|
- sumOutGoingAmount += res.itemAmount
|
|
|
- sumOutGoingQuantity += res.outGoingQuantity
|
|
|
- //根据 可售量和出库量的关系 显示 备足齐套还是备货不足 isStockUp 控制的
|
|
|
- if ((!res.usableQty) || (res.usableQty && (res.usableQty < res.outGoingQuantity))) {
|
|
|
- that.setData({
|
|
|
- isStockUp: false
|
|
|
- })
|
|
|
- }
|
|
|
- goodsList.push(res)
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- let form = this.data.form
|
|
|
- form.sumOutGoingAmount = sumOutGoingAmount
|
|
|
- form.sumOutGoingQuantity = sumOutGoingQuantity
|
|
|
- form.categoryQuantity = common.getCategoryQuantity(goodsList); // 计算品类数
|
|
|
- form.sumQuantity = goodsList.length
|
|
|
- this.setData({
|
|
|
- form: form,
|
|
|
- })
|
|
|
|
|
|
},
|
|
|
- onChange(event) {
|
|
|
- this.setData({
|
|
|
- activeNames: event.detail,
|
|
|
+ /**
|
|
|
+ * @desc : 查询商品明细
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ getItemDetal(orderId) {
|
|
|
+ return this.excute(this.data.service, this.data.service.selectOrderInfoById + '/' + orderId, {}).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ formData.goodsList = res.data.data.orderItem
|
|
|
+ this.setData({
|
|
|
+ formData: JSON.stringify(formData)
|
|
|
+ })
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
- //展开
|
|
|
- collapseFlagChange(e) {
|
|
|
- console.log(e.currentTarget.dataset.index)
|
|
|
-
|
|
|
- this.setData({
|
|
|
- collapseFlag: !this.data.collapseFlag
|
|
|
- })
|
|
|
- },
|
|
|
- onClickScan(e) {
|
|
|
- let barList = this.data.barList
|
|
|
- barList[e.currentTarget.dataset.index].checked = !barList[e.currentTarget.dataset.index].checked
|
|
|
- this.setData({
|
|
|
- barList: barList
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
- closeChoosedItemInfo_scan() {
|
|
|
- this.setData({
|
|
|
- sacnFlag: false
|
|
|
- })
|
|
|
- },
|
|
|
- formatDate_hours_minutes_seconds(timestamp) {
|
|
|
- // 创建一个新的Date对象
|
|
|
- var date = new Date(timestamp);
|
|
|
|
|
|
- // 获取年、月、日、时、分、秒
|
|
|
- var year = date.getFullYear();
|
|
|
- var month = ('0' + (date.getMonth() + 1)).slice(-2);
|
|
|
- var day = ('0' + date.getDate()).slice(-2);
|
|
|
- var hours = ('0' + date.getHours()).slice(-2);
|
|
|
- var minutes = ('0' + date.getMinutes()).slice(-2);
|
|
|
- var seconds = ('0' + date.getSeconds()).slice(-2);
|
|
|
|
|
|
- // 组合成YY-MM-DD HH:mm:ss格式
|
|
|
- return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
|
|
|
- },
|
|
|
- formatDate(dateString) {
|
|
|
- var date = new Date(dateString);
|
|
|
- var year = date.getFullYear();
|
|
|
- var month = ("0" + (date.getMonth() + 1)).slice(-2);
|
|
|
- var day = ("0" + date.getDate()).slice(-2);
|
|
|
|
|
|
- return year + "-" + month + "-" + day;
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 备注弹窗编辑事件
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月25日
|
|
|
- */
|
|
|
- changeRemarksField(e) {
|
|
|
- this.setData({
|
|
|
- remarks: e.detail
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 编辑商品关闭确定编辑备注事件
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年10月25日
|
|
|
- */
|
|
|
- updateToChooseList_remark(e) {
|
|
|
- let goodsList = this.data.goodsList
|
|
|
- goodsList[this.data.remarksIndex].remarks = this.data.remarks
|
|
|
- this.setData({
|
|
|
- goodsList: goodsList,
|
|
|
- remarkFlag: false
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 保存前校验
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年9月5日
|
|
|
- */
|
|
|
- beforeSaveCheck(type) {
|
|
|
- let goodsList = this.data.goodsList
|
|
|
- // for (let i = 0; i < goodsList.length; i++) {
|
|
|
- // if (goodsList[i].outGoingQuantity > goodsList[i].usableQty) {
|
|
|
- // wx.showToast({
|
|
|
- // title: '【' + goodsList[i].skuName + '】 的可售量不足',
|
|
|
- // icon: 'none'
|
|
|
- // });
|
|
|
- // return false
|
|
|
- // }
|
|
|
- // }
|
|
|
- if (!this.data.isStockUp) {
|
|
|
- wx.showToast({
|
|
|
- title: '有商品备货不足',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- return true
|
|
|
|
|
|
- },
|
|
|
/**
|
|
|
- * @desc : 出库-保存
|
|
|
- * @author : 王英杰
|
|
|
- * @date : 2023年8月25日
|
|
|
+ * 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
- submit(e) {
|
|
|
- if (this.data.loading) {
|
|
|
- return
|
|
|
- }
|
|
|
- let goodsList = this.data.goodsList
|
|
|
- if (goodsList.length < 0) {
|
|
|
- wx.showToast({
|
|
|
- title: '暂无可出库数据',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- let that = this
|
|
|
- let form = this.data.form
|
|
|
- let sale2OpeMode = form.sale2OpeMode
|
|
|
- let flag = false
|
|
|
- // 校验
|
|
|
- if (sale2OpeMode != '分销模式-代送') {
|
|
|
- flag = this.beforeSaveCheck(e.type)
|
|
|
- } else {
|
|
|
- flag = true
|
|
|
- }
|
|
|
- if (flag) {
|
|
|
- //保存前校验
|
|
|
- let objItem = this.data.form
|
|
|
- let param = {}
|
|
|
- param.sale2OpeMode = sale2OpeMode
|
|
|
- param.customerId = objItem.customerId //客户ID
|
|
|
- param.customerName = objItem.customerName //客户名称
|
|
|
- param.customerPhone = objItem.customerPhone //客户电话
|
|
|
- param.contactName = objItem.contactName //联系人
|
|
|
- param.deliveryPhone = objItem.deliveryPhone //联系电话
|
|
|
- param.salesChannel = objItem.salesChannel //销售渠道
|
|
|
- param.orgId = objItem.orgId //主业务部门
|
|
|
- param.staffId = objItem.staffId //业务员
|
|
|
- param.orderId = objItem.orderId //订单ID
|
|
|
- param.orderNo = objItem.orderNo //订单号
|
|
|
- param.outStatus = 2 //出库状态 2:出库中 3:已出库 4:出库暂存
|
|
|
- param.sumOutGoingQuantity = objItem.sumOutGoingQuantity //合计出库中数量
|
|
|
- param.sumOutGoingAmount = objItem.sumOutGoingAmount //合计出库中金额
|
|
|
- param.sumOutQuantity = objItem.autoOutFlg ? objItem.sumOutGoingQuantity : 0 //合计已出库数量
|
|
|
- param.sumOutAmount = objItem.autoOutFlg ? objItem.sumOutGoingAmount : 0 //合计已出库金额
|
|
|
- param.remarks = objItem.remarks || "" //备注
|
|
|
- param.remarksInside = objItem.remarksInside || "" //内部备注
|
|
|
- param.cpId = objItem.cpId //账套
|
|
|
- param.sale1Id = objItem.sale1Id //经销商ID
|
|
|
- param.sale2Id = objItem.sale2Id //分销商ID
|
|
|
- param.ascpId = objItem.ascpId //所属公司ID
|
|
|
- param.supplierId = "" //供应商ID
|
|
|
- param.outKind = "出库类型-销售" //出库类型
|
|
|
- param.outDate = this.formatDate(Date.now()) //出库日期
|
|
|
- param.categoryQuantity = objItem.categoryQuantity //品类数量
|
|
|
- param.makingUser = app.globalData.user.userId //制单人
|
|
|
- param.makingTime = this.formatDate_hours_minutes_seconds(Date.now()) //制单时间
|
|
|
- param.doneUser = app.globalData.user.userId //办理人
|
|
|
- param.doneTime = this.formatDate_hours_minutes_seconds(Date.now()) //办理时间
|
|
|
- param.salesChannelCode = objItem.salesChannelCode //销售渠道编码
|
|
|
- param.annexPaths = this.data.annexPaths //附件 tt
|
|
|
- param.deliveryUser = objItem.deliveryUser || "" //送货员
|
|
|
- param.installUser = objItem.installUser || "" //安装员
|
|
|
- param.autoOutFlg = objItem.autoOutFlg || false //自动出库标识
|
|
|
- param.orderOutItemVOList = this.data.goodsList //商品明细
|
|
|
- param.contractNo = objItem.contractNo //合同号
|
|
|
+ loadInit() {
|
|
|
+ if (this.data.formMode == Constants.formMode.other) {
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ formData = this.data.item
|
|
|
this.setData({
|
|
|
- loading: true
|
|
|
+ formData:JSON.stringify(formData)
|
|
|
})
|
|
|
- if (sale2OpeMode == '分销模式-代送') {
|
|
|
- api.request(Constants.SALES_OUTBOUND + 'insert', 'POST', param).then(res => {
|
|
|
- this.setData({
|
|
|
- loading: false
|
|
|
- })
|
|
|
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.cancellation()
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (sale2OpeMode == '分销模式-自营') {
|
|
|
- api.request(Constants.SALES_OUTBOUND + 'sale_out_insert_no_erp', 'POST', param).then(res => {
|
|
|
- this.setData({
|
|
|
- loading: false
|
|
|
- })
|
|
|
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.cancellation()
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- wx.showToast({
|
|
|
- title: '该单据应该在erp系统中进行销售出库操作',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- loading: false
|
|
|
- })
|
|
|
- }
|
|
|
|
|
|
|
|
|
+ } else {
|
|
|
+ let formData = JSON.parse(this.data.formData)
|
|
|
+ formData['staff'] = {
|
|
|
+ text: app.globalData.user.staffName,
|
|
|
+ value: [app.globalData.user.staffId]
|
|
|
+ }
|
|
|
+ formData['org'] = {
|
|
|
+ text: app.globalData.user.orgName,
|
|
|
+ value: [app.globalData.user.orgId]
|
|
|
+ }
|
|
|
+ formData.orgId = app.globalData.user.orgId
|
|
|
+ formData.orgList = [
|
|
|
+ {
|
|
|
+ orgId: app.globalData.user.orgId,
|
|
|
+ orgName: app.globalData.user.orgName,
|
|
|
+ ownerFlag: true,
|
|
|
+ allocationRatio: 100,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ formData.staffId = app.globalData.user.staffId
|
|
|
+ formData.staffList = [
|
|
|
+ {
|
|
|
+ staffId: app.globalData.user.staffId,
|
|
|
+ staffName: app.globalData.user.staffName,
|
|
|
+ ownerFlag: true,
|
|
|
+ allocationRatio: 100,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.setData({
|
|
|
+ formData: JSON.stringify(formData)
|
|
|
+ })
|
|
|
}
|
|
|
- },
|
|
|
- /**关闭 新建销售出库界面 */
|
|
|
- cancellation() {
|
|
|
- var pages = getCurrentPages();
|
|
|
- var prevPage = pages[pages.length - 2]; //上一个页面
|
|
|
- prevPage.setData({
|
|
|
- showShare: false,
|
|
|
- })
|
|
|
- wx.navigateBack({
|
|
|
- delta: 1
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
/**
|
|
|
- * @desc : 删除
|
|
|
+ * @desc : 自动办理事件
|
|
|
+ * @date : 2024/2/1 15:49
|
|
|
* @author : 于继渤
|
|
|
- * @date : 2022/5/31 18:16
|
|
|
*/
|
|
|
- onCloseDel(event) {
|
|
|
- let indexdata = event.currentTarget.dataset.index
|
|
|
- let form = this.data.form
|
|
|
- let arr = this.data.goodsList
|
|
|
-
|
|
|
- Dialog.confirm({
|
|
|
- message: '确定删除吗?',
|
|
|
- }).then(() => {
|
|
|
- // if (arr[indexdata].itemId) {
|
|
|
- // let orderItemDeleteVOListIds = []
|
|
|
- // //包含所有明细id
|
|
|
- // orderItemDeleteVOListIds.push(arr[indexdata].itemId)
|
|
|
- // if (arr[indexdata].goodsSkuList && arr[indexdata].goodsSkuList.length > 0) {
|
|
|
- // arr[indexdata].goodsSkuList.forEach(it => {
|
|
|
- // orderItemDeleteVOListIds.push(it.itemId)
|
|
|
- // })
|
|
|
- // }
|
|
|
- // form.orderItemDeleteVOList = form.orderItemDeleteVOList.concat(orderItemDeleteVOListIds)
|
|
|
- // }
|
|
|
- arr.splice(indexdata, 1)
|
|
|
- this.setData({
|
|
|
- goodsList: arr,
|
|
|
- form: form
|
|
|
- })
|
|
|
-
|
|
|
- let num = 0
|
|
|
- this.data.goodsList.forEach(function (res, index) {
|
|
|
- if ((!res.usableQty) || (res.usableQty && (res.usableQty < res.outGoingQuantity))) {
|
|
|
- num++
|
|
|
- }
|
|
|
- })
|
|
|
- //根据 可售量和出库量的关系 显示 备足齐套还是备货不足 isStockUp 控制的
|
|
|
- if (num > 0) {
|
|
|
- this.setData({
|
|
|
- isStockUp: false
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.setData({
|
|
|
- isStockUp: true
|
|
|
+ saveChange(e) {
|
|
|
+ let btnFormData = JSON.parse(this.data.btnFormData)
|
|
|
+ let that = this
|
|
|
+ if (!btnFormData.flag) {
|
|
|
+ //提示
|
|
|
+ Dialog.confirm({
|
|
|
+ message: mixins.$t("saleOutBoundInfo"),
|
|
|
+ }).then(() => { }).catch(() => {
|
|
|
+ btnFormData.flag = true
|
|
|
+ that.setData({
|
|
|
+ btnFormData: JSON.stringify(btnFormData)
|
|
|
})
|
|
|
- }
|
|
|
- //计算
|
|
|
- this.countGoodsList(arr)
|
|
|
- })
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
})
|