浏览代码

详情页,回告,搜索

1018653686@qq.com 1 年之前
父节点
当前提交
37f7a9536c
共有 1 个文件被更改,包括 163 次插入38 次删除
  1. 163 38
      src/views/WDLY/jd/order/index.vue

+ 163 - 38
src/views/WDLY/jd/order/index.vue

@@ -11,10 +11,86 @@
                     select: select,
                 }"
                 :action-list="[]"
-                @get-list="getList">
+                @get-list="getList"
+                @moreSearch="() => (queryDialogVisible = true)"
+        >
         </byTable>
+        <!--回告-->
+        <el-dialog :z-index="1500" title="采购单回告" v-if="tellDialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
+            <el-descriptions title="基础信息" />
+            <el-form label-width="auto" :rules="rules">
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="采购单号:" :span="8">
+                            {{formData.data.orderId}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="配送中心:" :span="8">
+                            {{formData.data.deliverCenterName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="入库时间:" :span="8">
+                            {{formData.data.storageTime}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="预计送货时间:" :span="8">
+                            <el-date-picker
+                                    v-model="formData.data.deliveryTime"
+                                    type="datetime"
+                                    format="YYYY-MM-DD HH:mm:ss"
+                                    value-format="YYYY-MM-DD HH:mm:ss"
+                                    placeholder="请选择预计送货时间"
+                            />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-descriptions title="采购单明细" />
+                    <el-table :data="formData.data.jdOrderDetailsList" stripe style="width: 100%">
+        <!--            <el-table stripe style="width: 100%">-->
+                        <el-table-column prop="wareId" label="京东商品编号" width="180">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareId}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="wareName" label="京东商品名称">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareName}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="productName" label="产品名称" />
+                        <el-table-column prop="originalNum" label="采购数量" />
+                        <el-table-column prop="confirmNum" label="确认数量" >
+                            <template v-slot="scope">
+                                <el-form-item :rules="rules['confirmNum']">
+                                    <el-input-number :min="0" :step="1" :max="scope.row.originalNum" v-model="scope.row.confirmNum" placeholder="请输入确认数量"/>
+                                </el-form-item>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="purchasePrice" label="采购价" />
+                        <el-table-column prop="nonDeliveryReason" label="不满足发货原因">
+                            <template v-slot="scope">
+                                <el-form-item :rules="rules['nonDeliveryReason']">
+                                    <el-input v-model="scope.row.nonDeliveryReason" placeholder="请输入不满足发货原因" />
+                                </el-form-item>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+            </el-form>
+            <template #footer>
+                <el-button @click="tellDialogVisible = false" size="large">取 消</el-button>
+                <el-button type="primary" @click="submitForm" size="large" :loading="submitLoading">采购单回告</el-button>
+            </template>
+        </el-dialog>
 
-        <el-dialog :z-index="1500" :title="formData.data.businessStatus=='1'?'采购单回告':'采购单详情'" v-if="dialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
+        <!--详情-->
+        <el-dialog :z-index="1500" title="采购单详情" v-if="dialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
             <el-descriptions title="基础信息" />
             <el-form label-width="auto" :rules="rules">
                 <el-row>
@@ -168,7 +244,7 @@
                 <el-row>
                     <el-descriptions title="采购单明细" />
                     <el-table :data="formData.data.jdOrderDetailsList" stripe style="width: 100%">
-        <!--            <el-table stripe style="width: 100%">-->
+                        <!--            <el-table stripe style="width: 100%">-->
                         <el-table-column prop="wareId" label="京东商品编号" width="180">
                             <template #default="scope">
                                 <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareId}}</span>
@@ -189,43 +265,32 @@
                         <el-table-column prop="totalPrice" label="采购总金额" />
                         <el-table-column prop="storeName" label="库房名称" />
                         <el-table-column prop="wareProperty" label="EPT采购单定制相关信息" />
-<!--                        <el-table-column v-if="formData.data.businessStatus!='0'" prop="confirmNum" label="确认数量" >
-                            <template v-slot="scope">
-                                <el-form-item :rules="rules['confirmNum']">
-                                    <el-input-number v-if="formData.data.businessStatus=='1'" :min="1" :step="1" :max="scope.row.originalNum" v-model="scope.row.confirmNum" placeholder="请输入确认数量"/>
-                                </el-form-item>
-                                <span v-if="formData.data.businessStatus=='2'">{{scope.row.confirmNum}}</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column v-if="formData.data.businessStatus!='0'" prop="nonDeliveryReason" label="不满足发货原因">
-                            <template v-slot="scope">
-                                <el-form-item :rules="rules['nonDeliveryReason']">
-                                    <el-input v-if="formData.data.businessStatus=='1'" v-model="scope.row.nonDeliveryReason" placeholder="请输入不满足发货原因" />
-                                </el-form-item>
-                                <span v-if="formData.data.businessStatus=='2'">{{scope.row.nonDeliveryReason}}</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column v-if="formData.data.businessStatus!='0'" prop="deliverCenterId" label="配送中心">
-                            <template v-slot="scope">
-                                <el-form-item :rules="rules['deliverCenterId']">
-                                    <el-select v-if="formData.data.businessStatus=='1'" v-model="scope.row.deliverCenterId" placeholder="请选择" >
-                                        <el-option
-                                                v-for="item in deliveryCenter"
-                                                :label="item.dictValue"
-                                                :value="item.dictKey"
-                                        >
-                                        </el-option>
-                                    </el-select>
-                                </el-form-item>
-                                <span v-if="formData.data.businessStatus=='2'">{{scope.row.deliverCenterName}}</span>
-                            </template>
-                        </el-table-column>-->
                     </el-table>
                 </el-row>
             </el-form>
             <template #footer>
                 <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-                <el-button type="primary" v-if="formData.data.businessStatus == 1" @click="submitForm" size="large" :loading="submitLoading">采购单回告</el-button>
+            </template>
+        </el-dialog>
+
+        <!--高级搜索-->
+        <el-dialog
+                :title="'高级检索'"
+                v-model="queryDialogVisible"
+                width="500px"
+                destroy-on-close
+        >
+            <el-form :model="sourceList.pagination" label-width="100px" label-position="top" >
+                <el-form-item label="采购单号">
+                    <el-input v-model="sourceList.pagination.orderId" placeholder="请输入采购单号" />
+                </el-form-item>
+                <el-form-item label="京东商品编号">
+                    <el-input v-model="sourceList.pagination.wareId" placeholder="请输入京东商品编号" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <el-button @click="handleReset" size="large">重置</el-button>
+                <el-button @click="handleQuery" type="primary" size="large">搜索</el-button>
             </template>
         </el-dialog>
     </div>
@@ -257,7 +322,11 @@ let rules = ref({
     nonDeliveryReason: [{ required: true, message: "请输入不满足发货原因", trigger: "blur" }],
     confirmNum: [{ required: true, message: "请输入确认数量", trigger: "blur" }]
 });
-let dialogVisible = ref(false);
+
+const queryDialogVisible = ref(false);
+const dialogVisible = ref(false);
+const tellDialogVisible = ref(false);
+
 let modalType = ref("add");
 const selectConfig = computed(() => {
     return [
@@ -329,6 +398,23 @@ const config = computed(() => {
         },
         {
             attrs: {
+                label: "回告状态",
+                prop: "confirmStateName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "是否可回告",
+                prop: "isCanConfirm",
+                align: "center"
+            },
+            render(value) {
+                return value?"可回告":"不可回告"
+            }
+        },
+        {
+            attrs: {
                 label: "详细地址",
                 prop: "address",
                 align: "center"
@@ -367,7 +453,7 @@ const config = computed(() => {
                 return [
                     {
                         attrs: {
-                            label: row.businessStatus=='1'?"采购单回告":"详情",
+                            label: "详情",
                             type: "primary",
                             text: true,
                         },
@@ -395,6 +481,19 @@ const config = computed(() => {
                             },
                         }
                         :{},
+                    row.businessStatus==1 && row.isCanConfirm?
+                        {
+                            attrs: {
+                                label: "回告",
+                                type: "danger",
+                                text: true,
+                            },
+                            el: "button",
+                            click() {
+                                getTellDtl(row);
+                            },
+                        }
+                        :{},
                 ];
             },
         },
@@ -480,6 +579,14 @@ const getDtl = (row) => {
     });
 };
 
+const getTellDtl = (row) => {
+    modalType.value = "edit";
+    proxy.post("/jdOrder/detail", { id: row.id }).then((res) => {
+        formData.data = res;
+        tellDialogVisible.value = true;
+    });
+};
+
 
 /**
  * 确认采购单状态
@@ -519,7 +626,7 @@ const submitForm = () => {
                     message: "回告成功",
                     type: "success",
                 });
-                dialogVisible.value = false;
+                tellDialogVisible.value = false;
                 submitLoading.value = false;
                 getList();
             },
@@ -529,9 +636,27 @@ const submitForm = () => {
             }
         );
     });
+};
 
+
+//高级搜索
+const handleReset = () => {
+    sourceList.value.pagination = {
+        pageNum: sourceList.value.pagination.pageNum,
+        pageSize: sourceList.value.pagination.pageSize,
+        arr: [],
+    };
+    handleQuery();
 };
 
+const handleQuery = () => {
+    if (sourceList.value.pagination.arr && sourceList.value.pagination.arr.length > 1) {
+        sourceList.value.pagination.purchaseStartTime = sourceList.value.pagination.arr[0];
+        sourceList.value.pagination.purchaseEndTime = sourceList.value.pagination.arr[1];
+    }
+    queryDialogVisible.value = false;
+    getList();
+};
 
 getDictlist()
 getList()