Explorar el Código

feat:旧机管理
1. 列表、导出
2. 出库、批量出库
3. 新增、编辑
4. 详情

Moss hace 1 año
padre
commit
dc3459b59b

+ 91 - 5
src/views/mallManagement/old_machine/index.vue

@@ -28,9 +28,9 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="销售类型" prop="salesType">
-                <el-radio-group v-model="formData.salesType" disabled>
-                  <el-radio :label="''">线下销售</el-radio>
+              <el-form-item label="销售类型" prop="saleType">
+                <el-radio-group v-model="formData.saleType" disabled>
+                  <el-radio :label="2">线下销售</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-col>
@@ -281,7 +281,90 @@
 				</div>
 			</div>
 
+      <div v-if="~['detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
+        <div style="font-weight: 500;">客户信息</div>
+        <el-divider></el-divider>
 
+        <el-descriptions border title="" :column="4" :colon="false" labelStyle="width: 8%" contentStyle="width: 17%">
+          <el-descriptions-item label="所属商户">
+            {{detailData.companyName}}
+          </el-descriptions-item>
+          <el-descriptions-item label="销售类型">
+            {{{1: '商城销售', 2: '线下销售'}[detailData.saleType]}}
+          </el-descriptions-item>
+          <el-descriptions-item label="订单单号">
+            {{detailData.orderId}}
+          </el-descriptions-item>
+          <el-descriptions-item label="工单类型">
+            {{detailData.orderSmallTypeText}}
+          </el-descriptions-item>
+        </el-descriptions>
+        <el-descriptions border title="" :column="4" :colon="false" labelStyle="width: 8%" contentStyle="width: 17%" style="margin-top: -1px">
+          <el-descriptions-item label="订单单号">
+            {{detailData.pgOrderId}}
+          </el-descriptions-item>
+          <el-descriptions-item label="完工时间">
+            {{detailData.overTime}}
+          </el-descriptions-item>
+          <el-descriptions-item label="客户姓名">
+            {{detailData.userName}}
+          </el-descriptions-item>
+          <el-descriptions-item label="客户电话">
+            {{detailData.userPhone}}
+          </el-descriptions-item>
+        </el-descriptions>
+        <el-descriptions border title="" :column="1" :colon="false" labelStyle="width: 8%" contentStyle="width: 92%" style="margin-top: -1px">
+          <el-descriptions-item label="详细地址">
+            {{detailData.province}}{{detailData.city}}{{detailData.area}}{{detailData.street}}{{detailData.userAddress}}
+          </el-descriptions-item>
+        </el-descriptions>
+        <el-descriptions border title="" :column="1" :colon="false" labelStyle="width: 8%" contentStyle="width: 92%" style="margin-top: -1px">
+          <el-descriptions-item label="附件">
+            <el-image 
+              v-if="detailData.fileUrl"
+              style="width: 100px; height: 100px"
+              :src="detailData.fileUrl" 
+              :preview-src-list="[detailData.fileUrl]">
+            </el-image>
+          </el-descriptions-item>
+          <el-descriptions-item label="备注">
+            {{detailData.remark}}
+          </el-descriptions-item>
+        </el-descriptions>
+
+        <el-tabs v-model="detailTabs" style="margin-top: 30px;">
+          <el-tab-pane label="旧机信息" name="a"></el-tab-pane>
+        </el-tabs>
+
+        <div v-show="detailTabs == 'a'">
+          <el-table
+            class="specTable"
+            :data="detailData.itemList"
+            element-loading-text="Loading"
+            border
+            highlight-current-row
+            stripe
+            style="margin-top: 20px">
+            <el-table-column align="center" label="大类" prop="mainName" min-width="160"></el-table-column>
+            <el-table-column align="center" label="小类" prop="smallName" min-width="160"></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="specName" min-width="160"></el-table-column>
+            <el-table-column align="center" label="属性" prop="attrId" min-width="160">
+              <template slot-scope="scope">
+                {{scope.row.oldProductManagerItemAttributes.map(o => o.dictName).join('、')}}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="单位" min-width="120">
+              <template>台</template>
+            </el-table-column>
+            <el-table-column align="center" label="数量" prop="num" min-width="120"></el-table-column>
+            <el-table-column align="center" label="金额" prop="payAmount" min-width="120"></el-table-column>
+          </el-table>
+        </div>
+
+				<div slot="footer" class="dialog-footer" style="margin-top: 20px;">
+				  <el-button size="mini" @click="data.removeTab()">关 闭</el-button>
+				</div>
+      </div>
 
     </template>
   </zj-tab-page>
@@ -342,7 +425,7 @@ export default {
       formData: {
         id: '',
         companyWechatName: '', // 所属商户
-        salesType: '', // 销售类型
+        saleType: 2, // 销售类型
         orderId: '', // 订单编号
         orderSmallType: '', // 工单类型
         pgOrderId: '', // 工单编号
@@ -490,6 +573,9 @@ export default {
           }
         },
         out: {
+          conditions: ({ row, index, column }) => {
+            return row.status == 'IN'
+          },
           btnType: 'text',
           prompt: '确定出库吗?',
           click: ({ row, index, column }) => {
@@ -641,7 +727,7 @@ export default {
             if (type == 'detail') {
       				this.formDialogType = 0
       			}
-            getDetail({ id }).then(res => {
+            getDetail({ oldManagerId: id }).then(res => {
               this.detailData = res.data;
             })
       		})

+ 1 - 1
src/views/mallManagement/order/order_detail/index.vue

@@ -194,7 +194,7 @@
             </el-row>
           </template>
         </el-table-column>
-        <el-table-column prop="goodsSpecName" label="规格" align="center"></el-table-column>
+        <el-table-column prop="goodsSpecValue" label="规格" align="center"></el-table-column>
         <el-table-column prop="price" label="单价" align="center"></el-table-column>
         <el-table-column prop="num" label="数量" align="center"></el-table-column>
         <el-table-column prop="shareAmount" label="分销金额" align="center">