|
@@ -70,202 +70,220 @@
|
|
|
<div style="width: 100%; padding: 0 20px">
|
|
|
<div style="margin-bottom: 10px" v-if="!formOption.disabled">
|
|
|
<el-button type="primary" size="small" @click="clickAddProduct()">选择产品</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="clickUploadProduct()">导入产品</el-button>
|
|
|
</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" v-if="!formOption.disabled">
|
|
|
- <span style="color: black; font-weight: 700">库存数量: </span>
|
|
|
- <span>{{ item.inventoryQuantity }}</span>
|
|
|
- </div>
|
|
|
- <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>
|
|
|
- </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; cursor: pointer"
|
|
|
- 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>
|
|
|
+ <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" v-if="!(route.query && route.query.detailId)">
|
|
|
+ <span style="color: black; font-weight: 700">库存数量: </span>
|
|
|
+ <span>{{ item.inventoryQuantity }}</span>
|
|
|
+ </div>
|
|
|
+ <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: 90px; color: black; font-weight: 700">E10成品品号: </span>
|
|
|
+ <el-form-item
|
|
|
+ :prop="'orderSkuList.' + index + '.erpCode'"
|
|
|
+ :rules="rules.erpCode"
|
|
|
+ :inline-message="true"
|
|
|
+ style="width: calc(100% - 90px)">
|
|
|
+ <el-input v-model="row.erpCode" placeholder="请输入E10成品品号" style="width: 100%" />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="line-height: 35px; display: flex">
|
|
|
+ <span style="width: 52px; color: black; font-weight: 700">特征码: </span>
|
|
|
+ <el-form-item
|
|
|
+ :prop="'orderSkuList.' + index + '.featureCode'"
|
|
|
+ :rules="rules.featureCode"
|
|
|
+ :inline-message="true"
|
|
|
+ style="width: calc(100% - 52px)">
|
|
|
+ <el-input v-model="row.featureCode" placeholder="请输入特征码" style="width: 100%" />
|
|
|
+ </el-form-item>
|
|
|
+ </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, true)" />
|
|
|
+ </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>{{ computeSingleDeliveryMaterialsFee(index) }}</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>
|
|
|
- </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>
|
|
|
+ </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; cursor: pointer"
|
|
|
+ v-if="row.blueprint"
|
|
|
+ :src="row.blueprint"
|
|
|
+ @click="openFile(row.blueprint)" />
|
|
|
+ <div style="display: flex" v-if="!(route.query && route.query.detailId)">
|
|
|
+ <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=".jpg,.jpeg,.png,.GIF,.JPG,.PNG">
|
|
|
+ <el-button type="primary" style="margin-left: 12px" text>上传图片</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div style="font-weight: 700; margin-top: 20px">产品不干胶图稿</div>
|
|
|
- <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; cursor: pointer"
|
|
|
- v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileUrl"
|
|
|
- :src="row.selfAdhesiveStickerFile.fileUrl"
|
|
|
- @click="openFile(row.selfAdhesiveStickerFile.fileUrl)" />
|
|
|
- <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 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="!(route.query && route.query.detailId)">
|
|
|
+ <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>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </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 || route.query.processType == 10">
|
|
|
- <el-form label-width="0" :model="formData.data" v-if="route.query.processType == 10">
|
|
|
- <el-button type="primary" size="small" @click="clickPackingFittings(index)">选择包材配件</el-button>
|
|
|
- </el-form>
|
|
|
- <el-button type="primary" size="small" @click="clickPackingFittings(index)" v-else>选择包材配件</el-button>
|
|
|
+ <div style="font-weight: 700; margin-top: 20px">产品不干胶图稿</div>
|
|
|
+ <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; cursor: pointer"
|
|
|
+ v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileUrl"
|
|
|
+ :src="row.selfAdhesiveStickerFile.fileUrl"
|
|
|
+ @click="openFile(row.selfAdhesiveStickerFile.fileUrl)" />
|
|
|
+ <div style="display: flex" v-if="!(route.query && route.query.detailId)">
|
|
|
+ <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%"
|
|
|
+ accept=".jpg,.jpeg,.png,.GIF,.JPG,.PNG">
|
|
|
+ <el-button type="primary" text>上传文件</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <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 label-width="0" :model="formData.data" v-if="route.query.processType == 10">
|
|
|
+ </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="!(route.query && route.query.detailId)">
|
|
|
+ <el-button type="primary" @click="clickPackingFittings(index)">选择包材配件</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="row.orderSkuBomList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
|
|
|
+ <el-table-column label="单价¥" width="120">
|
|
|
+ <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%"
|
|
|
- :disabled="true">
|
|
|
+ style="width: 100%">
|
|
|
<el-input-number
|
|
|
onmousewheel="return false;"
|
|
|
v-model="props.row.quantity"
|
|
@@ -274,71 +292,59 @@
|
|
|
:controls="false"
|
|
|
:min="0" />
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-form-item
|
|
|
- v-else
|
|
|
- :prop="'orderSkuList.' + index + '.orderSkuBomList.' + props.$index + '.quantity'"
|
|
|
- :rules="rules.quantity"
|
|
|
- :inline-message="true"
|
|
|
- style="width: 100%"
|
|
|
- :disabled="true">
|
|
|
- <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 || route.query.processType == 10">
|
|
|
- <template #default="props">
|
|
|
- <el-form label-width="0" :model="formData.data" v-if="route.query.processType == 10">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="名称" prop="bomSpecName" min-width="150" />
|
|
|
+ <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="!(route.query && route.query.detailId)">
|
|
|
+ <template #default="props">
|
|
|
<el-button type="danger" @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
|
|
|
- </el-form>
|
|
|
- <el-button type="danger" v-else @click="clickDeletePackingFittings(index, props.$index)" text>删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" width="60" v-if="!(route.query && route.query.detailId)">
|
|
|
+ <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>
|
|
|
</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 style="display: flex; padding: 8px 10px 0px">
|
|
|
+ <div style="flex: 1; padding: 0px 10px">
|
|
|
+ <div>包装要求:</div>
|
|
|
+ <div v-if="route.query && route.query.detailId">
|
|
|
+ <div v-html="getStyle(item.packageRemark)"></div>
|
|
|
+ </div>
|
|
|
+ <Editor
|
|
|
+ v-else
|
|
|
+ :value="item.packageRemark"
|
|
|
+ @updateValue="
|
|
|
+ (val) => {
|
|
|
+ return updatePackageRemark(val, index);
|
|
|
+ }
|
|
|
+ "
|
|
|
+ :ref="'editor_' + index" />
|
|
|
</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-item>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </el-collapse>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #deliveryTime>
|
|
@@ -436,6 +442,7 @@ 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;
|
|
@@ -786,7 +793,7 @@ const changeQuantity = (index) => {
|
|
|
}
|
|
|
};
|
|
|
const cellStyleName = ({ column, columnIndex }) => {
|
|
|
- if (column.label === "操作" && columnIndex === 4) {
|
|
|
+ if (column.label === "操作" && columnIndex === 3) {
|
|
|
return "vertical-align";
|
|
|
}
|
|
|
};
|
|
@@ -1081,6 +1088,33 @@ const calculatedOuterBoxPackingFee = () => {
|
|
|
}
|
|
|
return money;
|
|
|
};
|
|
|
+const computeDeliveryMaterialsFee = () => {
|
|
|
+ let money = 0;
|
|
|
+ if (formData.data.orderPackageBomList && formData.data.orderPackageBomList.length > 0) {
|
|
|
+ for (let i = 0; i < formData.data.orderPackageBomList.length; i++) {
|
|
|
+ if (formData.data.orderPackageBomList[i].internalSellingPrice && formData.data.orderPackageBomList[i].quantity) {
|
|
|
+ money = Number(
|
|
|
+ Math.round((money + formData.data.orderPackageBomList[i].internalSellingPrice * formData.data.orderPackageBomList[i].quantity) * 100) / 100
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return money;
|
|
|
+};
|
|
|
+const computeSingleDeliveryMaterialsFee = (index) => {
|
|
|
+ let money = computeDeliveryMaterialsFee();
|
|
|
+ let list = formData.data.orderSkuList.filter((item) => item.quantity > 0);
|
|
|
+ let num = 0;
|
|
|
+ let singlePrice = 0;
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ num = Number(Math.round(num + list[i].quantity));
|
|
|
+ }
|
|
|
+ singlePrice = Number(Math.ceil((money / num) * 1000) / 1000);
|
|
|
+ }
|
|
|
+ formData.data.orderSkuList[index].deliveryMaterialsFee = singlePrice;
|
|
|
+ return formData.data.orderSkuList[index].deliveryMaterialsFee;
|
|
|
+};
|
|
|
// 向父组件暴露
|
|
|
defineExpose({ getFormData, handleSubmit, saveShippingPackage });
|
|
|
</script>
|
|
@@ -1096,10 +1130,21 @@ defineExpose({ getFormData, handleSubmit, saveShippingPackage });
|
|
|
: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;
|
|
|
}
|
|
|
:deep(.vertical-align) {
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
+.shippingPackage {
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|