Parcourir la source

详情也改造

chenzhfa il y a 2 ans
Parent
commit
315dbbb497

+ 27 - 130
src/pages/Buyer/orderListDetail/index.js

@@ -31,11 +31,11 @@ const ifValidReturnButtonShow = (orderDetailData) => {
   if (orderDetailData.saleModel == "03") {
     return returnButtonShow;
   }
-  if (orderDetailData && orderDetailData.reqOrderItems) {
-    const { orderStatusCode, reqOrderItems } = orderDetailData;
+  if (orderDetailData && orderDetailData.orderItems) {
+    const { orderStatusCode, orderItems } = orderDetailData;
     // 审核通过的订单,累计退货数量 < 主数量 即可退货
     if (orderStatusCode == "03" || orderStatusCode == "04" || orderStatusCode == "05") {
-      for (const item of reqOrderItems) {
+      for (const item of orderItems) {
         // 存在商品行:主数量 - 累计退货数量 > 0, 则显示退货按钮
         const returnNum = parseFloat(item.mainNum || "0") - parseFloat(item.returnNum || "0");
         if (returnNum > 0) {
@@ -100,7 +100,18 @@ class OrderListDetail extends PureComponent {
               </div>
               <div className={styles.goodsInfo}>
                 <p className={styles.goodsTitleName}>{record.goodsDisplayName }</p>
-                <p className={styles.goodsCode}>{record.goodsCode}{goodsVersion(record.version)}</p>
+                <p className={styles.goodsCode}>
+                <span>编码:{record.goodsCode}</span>
+                <span style={{'margin-left':'20px'}}>规格:{record.specification}</span>
+                </p>
+                <p className={styles.goodsCode}>
+                <span>型号:{record.model}</span>
+                </p>
+                <p className={record.isGift == 1 ? styles.goodsStatus : ""}>
+                  <span className={styles.goodsStatusTxt}>
+                    {record.isGift == 1 ? "赠" : ""}
+                  </span>
+                </p>
                 <p
                   className={styles.goodsStatus}
                   style={{
@@ -125,15 +136,15 @@ class OrderListDetail extends PureComponent {
         }
       },
       {
-        title: "商品选配",
+        title: "商品颜色",
         dataIndex: "salePrice",
         key: "salePrice",
-        width: "10%",
+        width: "22%",
         render: (text, record, index) => {
           if (record.isOptional || record.baseGoodsOptValue) {
             return (
-              <span className={styles.goodsOpt} onClick={this.onGoodsOptionalHandle.bind(this, record, index)}>
-                {record.baseGoodsOptValue || "添加选配"}
+              <span className={styles.goodsOpt}>
+                {record.baseGoodsOptValue}
               </span>
             );
           } else {
@@ -175,19 +186,6 @@ class OrderListDetail extends PureComponent {
           </span>
         )
       },
-      {
-        title: "主数量",
-        dataIndex: "mainNum",
-        key: "mainNum",
-        width: "8%",
-        className: "alignRight",
-        render: (text, record, index) => (
-          <span>
-            {record.mainNum}
-            <em className={styles.em}>/{record.mainNumUnitName}</em>
-          </span>
-        )
-      },
       {
         title: "重量",
         dataIndex: "weight",
@@ -200,18 +198,6 @@ class OrderListDetail extends PureComponent {
           </div>
         )
       },
-      {
-        title: "体积",
-        dataIndex: "volume",
-        key: "volume",
-        width: "8%",
-        className: "alignRight",
-        render: (text, record, volume) => (
-          <span>
-            {unitPrecision(record.volume, record.volumeUnitScale, record.volumeUnitName)}
-          </span>
-        )
-      },
       {
         title: "金额",
         dataIndex: "dealAmount",
@@ -224,17 +210,6 @@ class OrderListDetail extends PureComponent {
           </span>
         )
       },
-      {
-        title: "项目",
-        dataIndex: "projectName",
-        key: "projectName",
-        width: "10%",
-        render: (text, record, index) => (
-          <span className={styles.projectName} title={text || ""}>
-            {text || ""}
-          </span>
-        )
-      }
     ];
     // BOM
     this.bomColumns = [
@@ -613,7 +588,7 @@ class OrderListDetail extends PureComponent {
     if (!orderDetailData) return null;
     // todo...
     const {
-      reqOrderItems,
+      orderItems,
       reqOrderItemBoms,
       reqOrderTracks,
       reqOrderLogs
@@ -867,19 +842,19 @@ class OrderListDetail extends PureComponent {
               >
                 复制本单
               </Button>
-              <Button className={styles.btn} onClick={this.exportOrderHandle}>
+              {/* <Button className={styles.btn} onClick={this.exportOrderHandle}>
                 订单导出
-              </Button>
+              </Button> */}
             </p>
             <p className={styles.orderCode}>
               总金额: {amountPrecision(orderDetailData.totalDealAmount, "amount", orderDetailData.currencySign, orderDetailData.currencyAmountScale)}
             </p>
           </div>
-          <div className={styles.rightBox}>
+          {/* <div className={styles.rightBox}>
             <Steps>
               {trackingsHtml()}
             </Steps>
-          </div>
+          </div> */}
         </div>
         {/* 订单状态--end */}
         {/* 收货信息 */}
@@ -917,18 +892,6 @@ class OrderListDetail extends PureComponent {
                 {orderDetailData.transportModeName}
               </div>
             </div>
-            <div className={styles.info}>
-              <span className={styles.name}>结账方式:</span>
-              <div className={styles.value}>
-                {orderDetailData.settleModeName}
-              </div>
-            </div>
-            <div className={styles.info}>
-              <span className={styles.name}>账期:</span>
-              <div className={styles.value}>
-                {orderDetailData.accountPeriodName}
-              </div>
-            </div>
           </div>
           <div className={styles.infoItem}>
             <p className={styles.title}>发票信息</p>
@@ -967,7 +930,7 @@ class OrderListDetail extends PureComponent {
               <Table
                 scroll={{ y: 550 }}
                 pagination={false}
-                dataSource={reqOrderItems}
+                dataSource={orderItems}
                 columns={orderColumns}
               />
             </TabPane>
@@ -989,12 +952,12 @@ class OrderListDetail extends PureComponent {
             </span>
             <span className={styles.name}>商品金额:</span>
           </div>
-          <div className={styles.item}>
+          {/* <div className={styles.item}>
             <span className={styles.valueBox}>
               {amountPrecision(orderDetailData.offsetAmount, "amount", orderDetailData.currencySign, orderDetailData.currencyAmountScale)}
             </span>
             <span className={styles.name}>费用冲抵:</span>
-          </div>
+          </div> */}
           <div className={styles.item} style={{ marginTop: 10 }}>
             <span
               className={styles.valueBox}
@@ -1007,76 +970,10 @@ class OrderListDetail extends PureComponent {
         </div>
         {/* 订单商品信息--end */}
         {/* 操作按钮 */}
-        <div className={styles.cancelBtnBox}>
-          <div className={styles.cancelBtn}>
-            <Button
-              className={styles.btn}
-              style={{ display: returnButtonShow ? "inline-block" : "none" }}
-              onClick={this.returnOrderHandle.bind(this, orderDetailData)}
-            >
-              退货
-            </Button>
-            {/* <Button className={styles.btn}>付款</Button> */}
-          </div>
-        </div>
         {/* 操作按钮--end */}
         {/* 发货信息 */}
-        <div className={styles.deliveryInfoBox}>
-          <p>
-            <span
-              className={styles.title}
-              onClick={this.deliveryHandle.bind(this)}
-            >
-              发货信息<Icon
-                type={this.state.deliveryDirect}
-                className={styles.icon}
-              />
-            </span>
-          </p>
-          <div
-            className={styles.goodsListBox}
-            style={{
-              display: this.state.deliveryDirect == "down" ? "block" : "none"
-            }}
-          >
-            <div className={styles.deliveryGoodsGrid}>
-              <div className={`${styles.goodsListHead} ${styles.another}`}>
-                <div className={styles.goodsDisplayName}>商品</div>
-                {/* <div className={styles.goodsPrice}>商品编码</div> */}
-                <div className={styles.goodsPrice}>单价</div>
-                {/* <div className={styles.goodsNum}>发货数量</div> */}
-                <div className={styles.mainNum}>发货数量</div>
-                <div className={styles.dealAmount}>金额小计</div>
-              </div>
-              <div className={styles.goodsList}>
-                {deliverHtml(deliveryColumns)}
-              </div>
-            </div>
-          </div>
-        </div>
         {/* 发货信息--end */}
         {/* 操作日志 */}
-        <div className={styles.deliveryInfoBox}>
-          <p>
-            <span className={styles.title} onClick={this.logsHandle.bind(this)}>
-              操作日志<Icon
-                type={this.state.logsDirect}
-                className={styles.icon}
-              />
-            </span>
-          </p>
-          <div
-            className={styles.logsBox}
-            style={{
-              display: this.state.logsDirect == "down" ? "block" : "none"
-            }}
-          >
-            {/* <div className={styles.scrollbar}>{logsHtml()}</div> */}
-            <div className={styles.scrollbar}>
-              <Timeline className={styles.timelineBox}>{logsHtml()}</Timeline>
-            </div>
-          </div>
-        </div>
         {/* 操作日志--end */}
         <GoodsOptsDialog
           title="商品选配"

+ 2 - 2
src/pages/Buyer/orderListDetail/index.less

@@ -217,7 +217,7 @@
   }
   .goodsOpt {
     display: inline-block;
-    width: 80px;
+    width: 200px;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
@@ -446,7 +446,7 @@
 }
 .goodsTitleName {
   color: #333;
-  width: 180px;
+  width: 250px;
   font-size: 14px;
   white-space: nowrap;
   text-overflow: ellipsis;