Ver código fonte

订单流程:包装要求调整

lxf 1 ano atrás
pai
commit
03d02ef0ba

+ 228 - 251
src/components/process/order.vue

@@ -71,253 +71,245 @@
           <div style="margin-bottom: 10px" v-if="!formOption.disabled">
             <el-button type="primary" size="small" @click="clickAddProduct()">选择产品</el-button>
           </div>
-          <el-collapse v-model="activeNames">
-            <div v-for="(item, index) in formData.data.orderSkuList" :key="index" style="margin-bottom: 20px">
-              <div style="border: 1px solid #edf0f5">
-                <el-table :data="[item]" :row-style="{ height: '35px' }" header-row-class-name="tableHeader" :cell-class-name="cellStyleName">
-                  <el-table-column label="产品" width="300">
-                    <template #default="{ row }">
-                      <div style="width: 100%">
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">商品名称: </span>
-                          <span>{{ item.wlnSkuName }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">品号: </span>
-                          <span>{{ item.code }}</span>
-                        </div>
-                        <div style="line-height: 35px; word-break: break-all">
-                          <span style="color: black; font-weight: 700">品名: </span>
-                          <span>{{ item.name }}</span>
-                        </div>
-                        <div style="line-height: 35px; display: flex">
-                          <span style="width: 37px; color: black; font-weight: 700">数量: </span>
-                          <el-form-item
-                            :prop="'orderSkuList.' + index + '.quantity'"
-                            :rules="rules.quantity"
-                            :inline-message="true"
-                            style="width: calc(100% - 37px)">
-                            <el-input-number
-                              onmousewheel="return false;"
-                              v-model="row.quantity"
-                              placeholder="数量"
-                              style="width: 100%"
-                              :controls="false"
-                              :min="0"
-                              :precision="0"
-                              @change="changeQuantity(index)" />
-                          </el-form-item>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">加工费: </span>
-                          <span>{{ item.customProcessingFee }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">代发费: </span>
-                          <span>{{ item.lssueFee }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">快递包材费: </span>
-                          <span>{{ item.deliveryMaterialsFee }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">包装人工费: </span>
-                          <span>{{ item.packingLabor }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">管理费: </span>
-                          <span>{{ item.managementFee }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">单价: </span>
-                          <span>{{ item.unitPrice }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="color: black; font-weight: 700">小计: </span>
-                          <span>{{ getSubtotal(item) }}</span>
-                        </div>
-                        <div style="line-height: 35px">
-                          <span style="width: 37px; color: black; font-weight: 700">打印: </span>
-                          <el-form-item
-                            :prop="'orderSkuList.' + index + '.printType'"
-                            :rules="rules.printType"
-                            :inline-message="true"
-                            style="width: calc(100% - 37px)">
-                            <el-radio-group v-model="item.printType" @change="changeQuantity(index)">
-                              <el-radio v-for="(itemType, index) in printType" :key="index" :label="itemType.dictKey">{{ itemType.dictValue }}</el-radio>
-                            </el-radio-group>
-                          </el-form-item>
-                        </div>
+          <div v-for="(item, index) in formData.data.orderSkuList" :key="index" style="margin-bottom: 20px">
+            <div style="border: 1px solid #edf0f5">
+              <el-table :data="[item]" :row-style="{ height: '35px' }" header-row-class-name="tableHeader" :cell-class-name="cellStyleName">
+                <el-table-column label="产品" width="280">
+                  <template #default="{ row }">
+                    <div style="width: 100%">
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">商品名称: </span>
+                        <span>{{ item.wlnSkuName }}</span>
                       </div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="产品图稿" width="400">
-                    <template #default="{ row }">
-                      <div style="display: flex; width: 100%">
-                        <div style="width: 80px">设计图:</div>
-                        <div style="width: calc(100% - 80px)">
-                          <el-image
-                            fit="scale-down"
-                            style="width: 148px; height: 148px; margin-right: 10px"
-                            v-if="row.blueprint"
-                            :src="row.blueprint"
-                            @click="openFile(row.blueprint)" />
-                          <div style="display: flex" v-if="!formOption.disabled">
-                            <el-button type="primary" @click="clickDrawingFile(index)" text>选择图稿</el-button>
-                            <el-upload
-                              :show-file-list="false"
-                              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                              :data="uploadImgData"
-                              :before-upload="uploadImgFile"
-                              :on-success="
-                                (response, uploadFile) => {
-                                  return handleImgSuccess(uploadFile, index);
-                                }
-                              "
-                              style="width: 100%"
-                              accept=".docx,.jpg,.jpeg,.png,.GIF,.JPG,.PNG">
-                              <el-button type="primary" style="margin-left: 12px" text>上传图片</el-button>
-                            </el-upload>
-                          </div>
-                        </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">品号: </span>
+                        <span>{{ item.code }}</span>
                       </div>
-                      <div style="display: flex; margin-top: 20px; width: 100%">
-                        <div style="width: 80px">图稿文件:</div>
-                        <div style="width: calc(100% - 80px)">
-                          <a
-                            style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
-                            @click="openFile(row.productionDocument)"
-                            v-if="row.productionDocument">
-                            {{ row.productionDocument }}
-                          </a>
-                          <div style="display: flex" v-if="!formOption.disabled">
-                            <el-button type="primary" @click="clickDrawingFile(index)" text>选择图稿</el-button>
-                            <el-upload
-                              :show-file-list="false"
-                              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                              :data="uploadData"
-                              :before-upload="uploadFile"
-                              :on-success="
-                                (response, uploadFile) => {
-                                  return handleSuccess(uploadFile, index);
-                                }
-                              "
-                              style="width: 100%">
-                              <el-button type="primary" style="margin-left: 12px" text>上传文件</el-button>
-                            </el-upload>
-                          </div>
+                      <div style="line-height: 35px; word-break: break-all">
+                        <span style="color: black; font-weight: 700">品名: </span>
+                        <span>{{ item.name }}</span>
+                      </div>
+                      <div style="line-height: 35px; display: flex">
+                        <span style="width: 37px; color: black; font-weight: 700">数量: </span>
+                        <el-form-item
+                          :prop="'orderSkuList.' + index + '.quantity'"
+                          :rules="rules.quantity"
+                          :inline-message="true"
+                          style="width: calc(100% - 37px)">
+                          <el-input-number
+                            onmousewheel="return false;"
+                            v-model="row.quantity"
+                            placeholder="数量"
+                            style="width: 100%"
+                            :controls="false"
+                            :min="0"
+                            :precision="0"
+                            @change="changeQuantity(index)" />
+                        </el-form-item>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">加工费: </span>
+                        <span>{{ item.customProcessingFee }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">代发费: </span>
+                        <span>{{ item.lssueFee }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">快递包材费: </span>
+                        <span>{{ item.deliveryMaterialsFee }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">包装人工费: </span>
+                        <span>{{ item.packingLabor }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">管理费: </span>
+                        <span>{{ item.managementFee }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">单价: </span>
+                        <span>{{ item.unitPrice }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="color: black; font-weight: 700">小计: </span>
+                        <span>{{ getSubtotal(item) }}</span>
+                      </div>
+                      <div style="line-height: 35px">
+                        <span style="width: 37px; color: black; font-weight: 700">打印: </span>
+                        <el-form-item
+                          :prop="'orderSkuList.' + index + '.printType'"
+                          :rules="rules.printType"
+                          :inline-message="true"
+                          style="width: calc(100% - 37px)">
+                          <el-radio-group v-model="item.printType" @change="changeQuantity(index)">
+                            <el-radio v-for="(itemType, index) in printType" :key="index" :label="itemType.dictKey">{{ itemType.dictValue }}</el-radio>
+                          </el-radio-group>
+                        </el-form-item>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="产品图稿" width="320">
+                  <template #default="{ row }">
+                    <div style="display: flex; width: 100%">
+                      <div style="width: 80px">设计图:</div>
+                      <div style="width: calc(100% - 80px)">
+                        <el-image
+                          fit="scale-down"
+                          style="width: 148px; height: 148px; margin-right: 10px"
+                          v-if="row.blueprint"
+                          :src="row.blueprint"
+                          @click="openFile(row.blueprint)" />
+                        <div style="display: flex" v-if="!formOption.disabled">
+                          <el-button type="primary" @click="clickDrawingFile(index)" text>选择图稿</el-button>
+                          <el-upload
+                            :show-file-list="false"
+                            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                            :data="uploadImgData"
+                            :before-upload="uploadImgFile"
+                            :on-success="
+                              (response, uploadFile) => {
+                                return handleImgSuccess(uploadFile, index);
+                              }
+                            "
+                            style="width: 100%"
+                            accept=".docx,.jpg,.jpeg,.png,.GIF,.JPG,.PNG">
+                            <el-button type="primary" style="margin-left: 12px" text>上传图片</el-button>
+                          </el-upload>
                         </div>
                       </div>
-                      <div style="display: flex; margin-top: 20px; width: 100%">
-                        <div style="width: 80px">不干胶图片:</div>
-                        <div style="width: calc(100% - 80px)">
-                          <a
-                            style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
-                            @click="openFile(row.selfAdhesiveStickerFile.fileUrl)"
-                            v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileName">
-                            {{ row.selfAdhesiveStickerFile.fileName }}
-                          </a>
-                          <div style="display: flex" v-if="!formOption.disabled">
-                            <el-upload
-                              :show-file-list="false"
-                              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                              :data="uploadAdhesiveData"
-                              :before-upload="uploadAdhesiveFile"
-                              :on-success="
-                                (response, uploadFile) => {
-                                  return handleAdhesiveSuccess(uploadFile, index);
-                                }
-                              "
-                              style="width: 100%">
-                              <el-button type="primary" text>上传文件</el-button>
-                            </el-upload>
-                          </div>
+                    </div>
+                    <div style="display: flex; margin-top: 20px; width: 100%">
+                      <div style="width: 80px">图稿文件:</div>
+                      <div style="width: calc(100% - 80px)">
+                        <a
+                          style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                          @click="openFile(row.productionDocument)"
+                          v-if="row.productionDocument">
+                          {{ row.productionDocument }}
+                        </a>
+                        <div style="display: flex" v-if="!formOption.disabled">
+                          <el-button type="primary" @click="clickDrawingFile(index)" text>选择图稿</el-button>
+                          <el-upload
+                            :show-file-list="false"
+                            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                            :data="uploadData"
+                            :before-upload="uploadFile"
+                            :on-success="
+                              (response, uploadFile) => {
+                                return handleSuccess(uploadFile, index);
+                              }
+                            "
+                            style="width: 100%">
+                            <el-button type="primary" style="margin-left: 12px" text>上传文件</el-button>
+                          </el-upload>
                         </div>
                       </div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="包材配件/单品" min-width="400">
-                    <template #default="{ row }">
-                      <div style="width: 100%">
-                        <div style="margin-bottom: 10px" v-if="!formOption.disabled">
-                          <el-button type="primary" @click="clickPackingFittings(index)">选择包材配件</el-button>
+                    </div>
+                    <div style="display: flex; margin-top: 20px; width: 100%">
+                      <div style="width: 80px">不干胶图片:</div>
+                      <div style="width: calc(100% - 80px)">
+                        <a
+                          style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                          @click="openFile(row.selfAdhesiveStickerFile.fileUrl)"
+                          v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileName">
+                          {{ row.selfAdhesiveStickerFile.fileName }}
+                        </a>
+                        <div style="display: flex" v-if="!formOption.disabled">
+                          <el-upload
+                            :show-file-list="false"
+                            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                            :data="uploadAdhesiveData"
+                            :before-upload="uploadAdhesiveFile"
+                            :on-success="
+                              (response, uploadFile) => {
+                                return handleAdhesiveSuccess(uploadFile, index);
+                              }
+                            "
+                            style="width: 100%">
+                            <el-button type="primary" text>上传文件</el-button>
+                          </el-upload>
                         </div>
-                        <el-table :data="row.orderSkuBomList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
-                          <el-table-column label="单价¥" width="80">
-                            <template #default="props">
-                              <div>
-                                <span>{{ moneyFormat(props.row.unitPrice, 2) }}</span>
-                              </div>
-                            </template>
-                          </el-table-column>
-                          <el-table-column label="数量" width="100">
-                            <template #default="props">
-                              <el-form-item
-                                :prop="'orderSkuList.' + index + '.orderSkuBomList.' + props.$index + '.quantity'"
-                                :rules="rules.quantity"
-                                :inline-message="true"
-                                style="width: 100%">
-                                <el-input-number
-                                  onmousewheel="return false;"
-                                  v-model="props.row.quantity"
-                                  placeholder="数量"
-                                  style="width: 100%"
-                                  :controls="false"
-                                  :min="0" />
-                              </el-form-item>
-                            </template>
-                          </el-table-column>
-                          <el-table-column label="名称" prop="bomSpecName" min-width="140" />
-                          <el-table-column label="总量" width="80">
-                            <template #default="props">
-                              {{ computeQuantity(index, props.$index) }}
-                            </template>
-                          </el-table-column>
-                          <el-table-column label="小计¥" width="100">
-                            <template #default="props">
-                              {{ moneyFormat(computeMoney(index, props.$index), 2) }}
-                            </template>
-                          </el-table-column>
-                          <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!formOption.disabled">
-                            <template #default="props">
-                              <el-button type="danger" @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
-                            </template>
-                          </el-table-column>
-                        </el-table>
                       </div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!formOption.disabled">
-                    <template #default="{}">
-                      <el-button type="danger" @click="clickDelete(index)" text>删除</el-button>
-                    </template>
-                  </el-table-column>
-                </el-table>
-                <el-collapse-item :name="index">
-                  <template #title>
-                    <span>包装</span>
+                    </div>
                   </template>
-                  <div style="display: flex; padding: 8px 10px 0px">
-                    <div style="flex: 1; padding: 0px 10px">
-                      <div>包装要求:</div>
-                      <div v-if="formOption.disabled">
-                        <div v-html="getStyle(item.packageRemark)"></div>
+                </el-table-column>
+                <el-table-column label="包材配件/单品" min-width="600">
+                  <template #default="{ row }">
+                    <div style="width: 100%">
+                      <div style="margin-bottom: 10px" v-if="!formOption.disabled">
+                        <el-button type="primary" size="small" @click="clickPackingFittings(index)">选择包材配件</el-button>
                       </div>
-                      <Editor
-                        v-else
-                        :value="item.packageRemark"
-                        @updateValue="
-                          (val) => {
-                            return updatePackageRemark(val, index);
-                          }
-                        "
-                        :ref="'editor_' + index" />
+                      <el-table :data="row.orderSkuBomList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
+                        <el-table-column label="单价¥" width="70">
+                          <template #default="props">
+                            <div>
+                              <span>{{ moneyFormat(props.row.unitPrice, 2) }}</span>
+                            </div>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="数量" width="90">
+                          <template #default="props">
+                            <el-form-item
+                              :prop="'orderSkuList.' + index + '.orderSkuBomList.' + props.$index + '.quantity'"
+                              :rules="rules.quantity"
+                              :inline-message="true"
+                              style="width: 100%">
+                              <el-input-number
+                                onmousewheel="return false;"
+                                v-model="props.row.quantity"
+                                placeholder="数量"
+                                style="width: 100%"
+                                :controls="false"
+                                :min="0" />
+                            </el-form-item>
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="名称" prop="bomSpecName" min-width="130" />
+                        <el-table-column label="总量" width="70">
+                          <template #default="props">
+                            {{ computeQuantity(index, props.$index) }}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="小计¥" width="100">
+                          <template #default="props">
+                            {{ moneyFormat(computeMoney(index, props.$index), 2) }}
+                          </template>
+                        </el-table-column>
+                        <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!formOption.disabled">
+                          <template #default="props">
+                            <el-button type="danger" @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
+                          </template>
+                        </el-table-column>
+                      </el-table>
                     </div>
-                  </div>
-                </el-collapse-item>
-              </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="包装要求" min-width="500">
+                  <template #default="{}">
+                    <div v-if="formOption.disabled">
+                      <div v-html="getStyle(item.packageRemark)"></div>
+                    </div>
+                    <Editor
+                      v-else
+                      :value="item.packageRemark"
+                      @updateValue="
+                        (val) => {
+                          return updatePackageRemark(val, index);
+                        }
+                      "
+                      :ref="'editor_' + index" />
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!formOption.disabled">
+                  <template #default="{}">
+                    <el-button type="danger" @click="clickDelete(index)" text>删除</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
             </div>
-          </el-collapse>
+          </div>
         </div>
       </template>
       <template #deliveryTime>
@@ -414,7 +406,6 @@ const props = defineProps({
 const route = useRoute();
 const submit = ref(null);
 const departmentList = ref([]);
-const activeNames = ref([]);
 const judgeStatus = () => {
   if (route.query.processType == 20 || route.query.processType == 10) {
     return true;
@@ -758,7 +749,7 @@ const changeQuantity = (index) => {
   }
 };
 const cellStyleName = ({ column, columnIndex }) => {
-  if (column.label === "操作" && columnIndex === 3) {
+  if (column.label === "操作" && columnIndex === 4) {
     return "vertical-align";
   }
 };
@@ -991,14 +982,6 @@ watch(
       if (route.query.id) {
         proxy.$refs.editor.changeHtml(formData.data.remark);
       }
-      if (route.query.detailId) {
-        let allIndex = [];
-        for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-          allIndex.push(i);
-        }
-        activeNames.value = allIndex;
-        formOption.disabled = true;
-      }
       let list = [formData.data.id];
       if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
         list = list.concat(formData.data.orderSkuList.map((item) => item.id));
@@ -1049,12 +1032,6 @@ defineExpose({ getFormData, handleSubmit });
 :deep(.ql-editor) {
   height: auto;
 }
-:deep(.el-collapse-item__header) {
-  justify-content: center;
-}
-:deep(.el-collapse-item__arrow) {
-  margin: 0;
-}
 :deep(.el-table__cell) {
   vertical-align: top;
 }

+ 14 - 3
src/views/subsidiary/order/management/index.vue

@@ -399,13 +399,24 @@ const clickAddOrder = () => {
 };
 const clickCode = (row) => {
   proxy.$router.replace({
-    path: "/addOrder",
+    path: "/platform_manage/process/processApproval",
     query: {
-      detailId: row.id,
-      text: "订单详情",
+      flowKey: "order",
+      flowName: "新建订单流程",
+      processType: "20",
+      id: row.id,
+      flowId: row.flowId,
       random: proxy.random(),
     },
   });
+  // proxy.$router.replace({
+  //   path: "/addOrder",
+  //   query: {
+  //     detailId: row.id,
+  //     text: "订单详情",
+  //     random: proxy.random(),
+  //   },
+  // });
 };
 const clickDelete = (row) => {
   ElMessageBox.confirm("你是否确认此操作", "提示", {