|
@@ -339,333 +339,323 @@
|
|
|
@click="showScancode"
|
|
@click="showScancode"
|
|
|
/>
|
|
/>
|
|
|
</van-tab>
|
|
</van-tab>
|
|
|
|
|
+ </van-tabs>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <van-dialog
|
|
|
|
|
+ v-model:show="scancodeDialog"
|
|
|
|
|
+ title="扫描条码"
|
|
|
|
|
+ @open="openScanCode"
|
|
|
|
|
+ @confirm="showQualityStatus"
|
|
|
|
|
+ show-cancel-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ ref="scancodeInputRef"
|
|
|
|
|
+ v-model="scancode"
|
|
|
|
|
+ label="商品条码"
|
|
|
|
|
+ autocomplete="off"
|
|
|
|
|
+ @keyup.enter="showQualityStatus"
|
|
|
|
|
+ placeholder="商品条码"
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-dialog>
|
|
|
|
|
|
|
|
- <van-dialog
|
|
|
|
|
- v-model:show="scancodeDialog"
|
|
|
|
|
- title="扫描条码"
|
|
|
|
|
- @open="openScanCode"
|
|
|
|
|
- @confirm="showQualityStatus"
|
|
|
|
|
- show-cancel-button
|
|
|
|
|
- >
|
|
|
|
|
- <van-field
|
|
|
|
|
- ref="scancodeInputRef"
|
|
|
|
|
- v-model="scancode"
|
|
|
|
|
- label="商品条码"
|
|
|
|
|
- autocomplete="off"
|
|
|
|
|
- @keyup.enter="showQualityStatus"
|
|
|
|
|
- placeholder="商品条码"
|
|
|
|
|
- />
|
|
|
|
|
- </van-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <van-dialog
|
|
|
|
|
- v-model:show="qualityStatusDialog"
|
|
|
|
|
- title="质量状态"
|
|
|
|
|
- @confirm="queryBarcode"
|
|
|
|
|
- show-cancel-button
|
|
|
|
|
|
|
+ <van-dialog
|
|
|
|
|
+ v-model:show="qualityStatusDialog"
|
|
|
|
|
+ title="质量状态"
|
|
|
|
|
+ @confirm="queryBarcode"
|
|
|
|
|
+ show-cancel-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-radio-group v-model="qualityStatus">
|
|
|
|
|
+ <template v-for="(item, index) in qualityStatusOptions">
|
|
|
|
|
+ <van-cell
|
|
|
|
|
+ :title="item.text"
|
|
|
|
|
+ clickable
|
|
|
|
|
+ @click="qualityStatus = item.value"
|
|
|
>
|
|
>
|
|
|
- <van-radio-group v-model="qualityStatus">
|
|
|
|
|
- <template v-for="(item, index) in qualityStatusOptions">
|
|
|
|
|
- <van-cell
|
|
|
|
|
- :title="item.text"
|
|
|
|
|
- clickable
|
|
|
|
|
- @click="qualityStatus = item.value"
|
|
|
|
|
- >
|
|
|
|
|
- <template #right-icon>
|
|
|
|
|
- <van-radio :name="item.value" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </van-cell>
|
|
|
|
|
|
|
+ <template #right-icon>
|
|
|
|
|
+ <van-radio :name="item.value" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-cell>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-radio-group>
|
|
|
|
|
+ </van-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <van-dialog
|
|
|
|
|
+ v-model:show="returnedDetailDialog"
|
|
|
|
|
+ title="商品详情"
|
|
|
|
|
+ show-cancel-button
|
|
|
|
|
+ :lazy-render="true"
|
|
|
|
|
+ :show-confirm-button="checkUploadImages()"
|
|
|
|
|
+ @confirm="addDetails"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div style="max-height: 70vh; overflow-y: auto">
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ v-model="selectDetail.sku"
|
|
|
|
|
+ label="SKU"
|
|
|
|
|
+ placeholder="SKU"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ readonly
|
|
|
|
|
+ v-model="selectDetail.barCode"
|
|
|
|
|
+ label="商品条码"
|
|
|
|
|
+ placeholder="商品条码"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ v-model="selectDetail.tradeName"
|
|
|
|
|
+ label="商品名称"
|
|
|
|
|
+ placeholder="商品名称"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ readonly
|
|
|
|
|
+ clickable
|
|
|
|
|
+ label="质量状态"
|
|
|
|
|
+ placeholder="质量状态"
|
|
|
|
|
+ v-model="selectDetail.qualityStatus"
|
|
|
|
|
+ @click="selectedDetailQualityStatus = true"
|
|
|
|
|
+ />
|
|
|
|
|
+ <van-popup
|
|
|
|
|
+ v-model:show="selectedDetailQualityStatus"
|
|
|
|
|
+ position="bottom"
|
|
|
|
|
+ destroy-on-close
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-picker
|
|
|
|
|
+ :columns="qualityStatusOptions"
|
|
|
|
|
+ @cancel="selectedDetailQualityStatus = false"
|
|
|
|
|
+ @confirm="selectedDetailQualityStatusFunc"
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ is-link
|
|
|
|
|
+ readonly
|
|
|
|
|
+ name="datePicker"
|
|
|
|
|
+ label="生产日期"
|
|
|
|
|
+ :placeholder="selectDetail.manufactureTime ? '' : '请选择生产日期'"
|
|
|
|
|
+ :model-value="formatDateDisplay(selectDetail.manufactureTime)"
|
|
|
|
|
+ @click="showManufactureTime = true"
|
|
|
|
|
+ />
|
|
|
|
|
+ <van-popup
|
|
|
|
|
+ v-model:show="showManufactureTime"
|
|
|
|
|
+ destroy-on-close
|
|
|
|
|
+ position="bottom"
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-date-picker
|
|
|
|
|
+ :max-date="maxDate"
|
|
|
|
|
+ :min-date="minDate"
|
|
|
|
|
+ :model-value="parseDateValue(selectDetail.manufactureTime)"
|
|
|
|
|
+ @confirm="manufactureTimeConfirm"
|
|
|
|
|
+ @cancel="showManufactureTime = false"
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ :model-value="formatDateDisplay(selectDetail.validityTime)"
|
|
|
|
|
+ is-link
|
|
|
|
|
+ readonly
|
|
|
|
|
+ name="datePicker"
|
|
|
|
|
+ label="失效日期"
|
|
|
|
|
+ :placeholder="selectDetail.validityTime ? '' : '请选择失效日期'"
|
|
|
|
|
+ @click="showValidityTime = true"
|
|
|
|
|
+ />
|
|
|
|
|
+ <van-popup
|
|
|
|
|
+ v-model:show="showValidityTime"
|
|
|
|
|
+ destroy-on-close
|
|
|
|
|
+ position="bottom"
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-date-picker
|
|
|
|
|
+ :max-date="maxDate"
|
|
|
|
|
+ :min-date="minDate"
|
|
|
|
|
+ :model-value="parseDateValue(selectDetail.validityTime)"
|
|
|
|
|
+ @confirm="validityTimeConfirm"
|
|
|
|
|
+ @cancel="showValidityTime = false"
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ autocomplete="off"
|
|
|
|
|
+ v-model="selectDetail.batchNumber"
|
|
|
|
|
+ label="批次号"
|
|
|
|
|
+ placeholder="批次号"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ v-model="selectDetail.number"
|
|
|
|
|
+ label="数量"
|
|
|
|
|
+ type="digit"
|
|
|
|
|
+ placeholder="数量"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <van-field
|
|
|
|
|
+ v-model="selectDetail.remark"
|
|
|
|
|
+ label="备注"
|
|
|
|
|
+ placeholder="备注"
|
|
|
|
|
+ label-align="top"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <van-row v-if="showAccessories">
|
|
|
|
|
+ <div style="font-size: 12px">
|
|
|
|
|
+ <template v-for="(item, index) in accessories">
|
|
|
|
|
+ <p>
|
|
|
|
|
+ 配件条码: [<span style="color: #2ca547">{{
|
|
|
|
|
+ item.accessory
|
|
|
|
|
+ }}</span
|
|
|
|
|
+ >] [<span style="color: #277b39">{{ item.descrC }}</span
|
|
|
|
|
+ >] 数量: [<span style="color: #2ca547">{{ item.qty }}</span
|
|
|
|
|
+ >]件
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <p style="font-size: 12px">
|
|
|
|
|
+ 请检查商品: 【<span style="color: #ff2020">{{
|
|
|
|
|
+ selectDetail.sku
|
|
|
|
|
+ }}</span
|
|
|
|
|
+ >】 {{ selectDetail.tradeName }} 配件
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-row>
|
|
|
|
|
+
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-if="selectDetail.boxPhotos && selectDetail.boxPhotos.length > 0"
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-divider content-position="left" style="margin: 0px"
|
|
|
|
|
+ >外箱图
|
|
|
|
|
+ </van-divider>
|
|
|
|
|
+ <van-row>
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-if="selectDetail.boxPhotos && selectDetail.boxPhotos.length > 0"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-for="(item, index) in selectDetail.boxPhotos">
|
|
|
|
|
+ <van-col span="4">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ :key="`box-photos-${index}`"
|
|
|
|
|
+ width="100%"
|
|
|
|
|
+ height="50"
|
|
|
|
|
+ :src="getImageUrl(item, '外箱图')"
|
|
|
|
|
+ @click="showBoxImagePreview(index)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-col>
|
|
|
</template>
|
|
</template>
|
|
|
- </van-radio-group>
|
|
|
|
|
- </van-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <van-dialog
|
|
|
|
|
- v-model:show="returnedDetailDialog"
|
|
|
|
|
- title="商品详情"
|
|
|
|
|
- show-cancel-button
|
|
|
|
|
- :lazy-render="true"
|
|
|
|
|
- :show-confirm-button="checkUploadImages()"
|
|
|
|
|
- @confirm="addDetails"
|
|
|
|
|
- >
|
|
|
|
|
- <div style="max-height: 70vh; overflow-y: auto">
|
|
|
|
|
- <van-field
|
|
|
|
|
- v-model="selectDetail.sku"
|
|
|
|
|
- label="SKU"
|
|
|
|
|
- placeholder="SKU"
|
|
|
|
|
- clearable
|
|
|
|
|
- />
|
|
|
|
|
- <van-field
|
|
|
|
|
- readonly
|
|
|
|
|
- v-model="selectDetail.barCode"
|
|
|
|
|
- label="商品条码"
|
|
|
|
|
- placeholder="商品条码"
|
|
|
|
|
- clearable
|
|
|
|
|
- />
|
|
|
|
|
- <van-field
|
|
|
|
|
- v-model="selectDetail.tradeName"
|
|
|
|
|
- label="商品名称"
|
|
|
|
|
- placeholder="商品名称"
|
|
|
|
|
- readonly
|
|
|
|
|
- />
|
|
|
|
|
|
|
|
|
|
- <van-field
|
|
|
|
|
- readonly
|
|
|
|
|
- clickable
|
|
|
|
|
- label="质量状态"
|
|
|
|
|
- placeholder="质量状态"
|
|
|
|
|
- v-model="selectDetail.qualityStatus"
|
|
|
|
|
- @click="selectedDetailQualityStatus = true"
|
|
|
|
|
- />
|
|
|
|
|
- <van-popup
|
|
|
|
|
- v-model:show="selectedDetailQualityStatus"
|
|
|
|
|
- position="bottom"
|
|
|
|
|
- destroy-on-close
|
|
|
|
|
- >
|
|
|
|
|
- <van-picker
|
|
|
|
|
- :columns="qualityStatusOptions"
|
|
|
|
|
- @cancel="selectedDetailQualityStatus = false"
|
|
|
|
|
- @confirm="selectedDetailQualityStatusFunc"
|
|
|
|
|
- />
|
|
|
|
|
- </van-popup>
|
|
|
|
|
-
|
|
|
|
|
- <van-field
|
|
|
|
|
- is-link
|
|
|
|
|
- readonly
|
|
|
|
|
- name="datePicker"
|
|
|
|
|
- label="生产日期"
|
|
|
|
|
- :placeholder="
|
|
|
|
|
- selectDetail.manufactureTime ? '' : '请选择生产日期'
|
|
|
|
|
- "
|
|
|
|
|
- :model-value="formatDateDisplay(selectDetail.manufactureTime)"
|
|
|
|
|
- @click="showManufactureTime = true"
|
|
|
|
|
- />
|
|
|
|
|
- <van-popup
|
|
|
|
|
- v-model:show="showManufactureTime"
|
|
|
|
|
- destroy-on-close
|
|
|
|
|
- position="bottom"
|
|
|
|
|
- >
|
|
|
|
|
- <van-date-picker
|
|
|
|
|
- :max-date="maxDate"
|
|
|
|
|
- :min-date="minDate"
|
|
|
|
|
- :model-value="parseDateValue(selectDetail.manufactureTime)"
|
|
|
|
|
- @confirm="manufactureTimeConfirm"
|
|
|
|
|
- @cancel="showManufactureTime = false"
|
|
|
|
|
- />
|
|
|
|
|
- </van-popup>
|
|
|
|
|
-
|
|
|
|
|
- <van-field
|
|
|
|
|
- :model-value="formatDateDisplay(selectDetail.validityTime)"
|
|
|
|
|
- is-link
|
|
|
|
|
- readonly
|
|
|
|
|
- name="datePicker"
|
|
|
|
|
- label="失效日期"
|
|
|
|
|
- :placeholder="selectDetail.validityTime ? '' : '请选择失效日期'"
|
|
|
|
|
- @click="showValidityTime = true"
|
|
|
|
|
- />
|
|
|
|
|
- <van-popup
|
|
|
|
|
- v-model:show="showValidityTime"
|
|
|
|
|
- destroy-on-close
|
|
|
|
|
- position="bottom"
|
|
|
|
|
|
|
+ <van-image-preview
|
|
|
|
|
+ v-model:show="showBoxPreview"
|
|
|
|
|
+ :images="detailBoxImages"
|
|
|
|
|
+ :start-position="startBoxPosition"
|
|
|
|
|
+ @change="onBoxPreviewChange"
|
|
|
|
|
+ closeable
|
|
|
>
|
|
>
|
|
|
- <van-date-picker
|
|
|
|
|
- :max-date="maxDate"
|
|
|
|
|
- :min-date="minDate"
|
|
|
|
|
- :model-value="parseDateValue(selectDetail.validityTime)"
|
|
|
|
|
- @confirm="validityTimeConfirm"
|
|
|
|
|
- @cancel="showValidityTime = false"
|
|
|
|
|
- />
|
|
|
|
|
- </van-popup>
|
|
|
|
|
-
|
|
|
|
|
- <van-field
|
|
|
|
|
- autocomplete="off"
|
|
|
|
|
- v-model="selectDetail.batchNumber"
|
|
|
|
|
- label="批次号"
|
|
|
|
|
- placeholder="批次号"
|
|
|
|
|
- clearable
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <van-field
|
|
|
|
|
- v-model="selectDetail.number"
|
|
|
|
|
- label="数量"
|
|
|
|
|
- type="digit"
|
|
|
|
|
- placeholder="数量"
|
|
|
|
|
- clearable
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <van-field
|
|
|
|
|
- v-model="selectDetail.remark"
|
|
|
|
|
- label="备注"
|
|
|
|
|
- placeholder="备注"
|
|
|
|
|
- label-align="top"
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <van-row v-if="showAccessories">
|
|
|
|
|
- <div style="font-size: 12px">
|
|
|
|
|
- <template v-for="(item, index) in accessories">
|
|
|
|
|
- <p>
|
|
|
|
|
- 配件条码: [<span style="color: #2ca547">{{
|
|
|
|
|
- item.accessory
|
|
|
|
|
|
|
+ <template #index>
|
|
|
|
|
+ <div class="custom-toolbar">
|
|
|
|
|
+ <span
|
|
|
|
|
+ >{{ startPhotosPosition + 1 }}/{{
|
|
|
|
|
+ selectDetail.boxPhotos.length
|
|
|
}}</span
|
|
}}</span
|
|
|
- >] [<span style="color: #277b39">{{ item.descrC }}</span
|
|
|
|
|
- >] 数量: [<span style="color: #2ca547">{{
|
|
|
|
|
- item.qty
|
|
|
|
|
- }}</span
|
|
|
|
|
- >]件
|
|
|
|
|
- </p>
|
|
|
|
|
- </template>
|
|
|
|
|
- <p style="font-size: 12px">
|
|
|
|
|
- 请检查商品: 【<span style="color: #ff2020">{{
|
|
|
|
|
- selectDetail.sku
|
|
|
|
|
- }}</span
|
|
|
|
|
- >】 {{ selectDetail.tradeName }} 配件
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </van-row>
|
|
|
|
|
-
|
|
|
|
|
- <template
|
|
|
|
|
- v-if="
|
|
|
|
|
- selectDetail.boxPhotos && selectDetail.boxPhotos.length > 0
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <van-divider content-position="left" style="margin: 0px"
|
|
|
|
|
- >外箱图
|
|
|
|
|
- </van-divider>
|
|
|
|
|
- <van-row>
|
|
|
|
|
- <template
|
|
|
|
|
- v-if="
|
|
|
|
|
- selectDetail.boxPhotos &&
|
|
|
|
|
- selectDetail.boxPhotos.length > 0
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <template v-for="(item, index) in selectDetail.boxPhotos">
|
|
|
|
|
- <van-col span="4">
|
|
|
|
|
- <van-image
|
|
|
|
|
- :key="`box-photos-${index}`"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- height="50"
|
|
|
|
|
- :src="getImageUrl(item, '外箱图')"
|
|
|
|
|
- @click="showBoxImagePreview(index)"
|
|
|
|
|
- />
|
|
|
|
|
- </van-col>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <van-image-preview
|
|
|
|
|
- v-model:show="showBoxPreview"
|
|
|
|
|
- :images="detailBoxImages"
|
|
|
|
|
- :start-position="startBoxPosition"
|
|
|
|
|
- @change="onBoxPreviewChange"
|
|
|
|
|
- closeable
|
|
|
|
|
>
|
|
>
|
|
|
- <template #index>
|
|
|
|
|
- <div class="custom-toolbar">
|
|
|
|
|
- <span
|
|
|
|
|
- >{{ startPhotosPosition + 1 }}/{{
|
|
|
|
|
- selectDetail.boxPhotos.length
|
|
|
|
|
- }}</span
|
|
|
|
|
- >
|
|
|
|
|
- <van-button
|
|
|
|
|
- icon="delete"
|
|
|
|
|
- type="danger"
|
|
|
|
|
- @click.stop="handleBoxDelete"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- >删除
|
|
|
|
|
- </van-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </van-image-preview>
|
|
|
|
|
- </template>
|
|
|
|
|
- </van-row>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <template
|
|
|
|
|
- v-if="
|
|
|
|
|
- selectDetail.productPhotos &&
|
|
|
|
|
- selectDetail.productPhotos.length > 0
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <van-divider content-position="left" style="margin: 0px"
|
|
|
|
|
- >内物图
|
|
|
|
|
- </van-divider>
|
|
|
|
|
- <van-row>
|
|
|
|
|
- <template v-for="(item, index) in selectDetail.productPhotos">
|
|
|
|
|
- <van-col span="4">
|
|
|
|
|
- <van-image
|
|
|
|
|
- :key="`product-photos-${index}`"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- height="50"
|
|
|
|
|
- :src="getImageUrl(item, '内物图')"
|
|
|
|
|
- @click="showPhotosImagePreview(index)"
|
|
|
|
|
- />
|
|
|
|
|
- </van-col>
|
|
|
|
|
- </template>
|
|
|
|
|
- </van-row>
|
|
|
|
|
-
|
|
|
|
|
- <van-image-preview
|
|
|
|
|
- v-model:show="showPhotosPreview"
|
|
|
|
|
- :images="detailProductImages"
|
|
|
|
|
- :start-position="startPhotosPosition"
|
|
|
|
|
- @change="onPhotosPreviewChange"
|
|
|
|
|
- closeable
|
|
|
|
|
- >
|
|
|
|
|
- <template #index>
|
|
|
|
|
- <div class="custom-toolbar">
|
|
|
|
|
- <span>
|
|
|
|
|
- {{ startPhotosPosition + 1 }}/{{
|
|
|
|
|
- selectDetail.productPhotos.length
|
|
|
|
|
- }}
|
|
|
|
|
- </span>
|
|
|
|
|
- <van-button
|
|
|
|
|
- icon="delete"
|
|
|
|
|
- type="danger"
|
|
|
|
|
- @click.stop="handlePhotosDelete"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- >删除
|
|
|
|
|
- </van-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </van-image-preview>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <van-row>
|
|
|
|
|
- <van-col span="12">
|
|
|
|
|
- <van-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- block
|
|
|
|
|
- @click="invokeCameraToCapture('外箱图')"
|
|
|
|
|
- >外箱图录入
|
|
|
|
|
- </van-button>
|
|
|
|
|
- </van-col>
|
|
|
|
|
- <van-col span="12">
|
|
|
|
|
- <van-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- block
|
|
|
|
|
- @click="invokeCameraToCapture('内物图')"
|
|
|
|
|
- >内物图录入
|
|
|
|
|
- </van-button>
|
|
|
|
|
- </van-col>
|
|
|
|
|
- </van-row>
|
|
|
|
|
-
|
|
|
|
|
- <input
|
|
|
|
|
- type="file"
|
|
|
|
|
- id="outer-carton-box-input"
|
|
|
|
|
- capture="user"
|
|
|
|
|
- accept="image/*"
|
|
|
|
|
- hidden
|
|
|
|
|
- :onchange="outerCartonInput"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <van-button
|
|
|
|
|
+ icon="delete"
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ @click.stop="handleBoxDelete"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ >删除
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-image-preview>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-row>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ selectDetail.productPhotos && selectDetail.productPhotos.length > 0
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-divider content-position="left" style="margin: 0px"
|
|
|
|
|
+ >内物图
|
|
|
|
|
+ </van-divider>
|
|
|
|
|
+ <van-row>
|
|
|
|
|
+ <template v-for="(item, index) in selectDetail.productPhotos">
|
|
|
|
|
+ <van-col span="4">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ :key="`product-photos-${index}`"
|
|
|
|
|
+ width="100%"
|
|
|
|
|
+ height="50"
|
|
|
|
|
+ :src="getImageUrl(item, '内物图')"
|
|
|
|
|
+ @click="showPhotosImagePreview(index)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </van-col>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-row>
|
|
|
|
|
+
|
|
|
|
|
+ <van-image-preview
|
|
|
|
|
+ v-model:show="showPhotosPreview"
|
|
|
|
|
+ :images="detailProductImages"
|
|
|
|
|
+ :start-position="startPhotosPosition"
|
|
|
|
|
+ @change="onPhotosPreviewChange"
|
|
|
|
|
+ closeable
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #index>
|
|
|
|
|
+ <div class="custom-toolbar">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ {{ startPhotosPosition + 1 }}/{{
|
|
|
|
|
+ selectDetail.productPhotos.length
|
|
|
|
|
+ }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <van-button
|
|
|
|
|
+ icon="delete"
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ @click.stop="handlePhotosDelete"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ >删除
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-image-preview>
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
- <input
|
|
|
|
|
- type="file"
|
|
|
|
|
- id="inner-contents-input"
|
|
|
|
|
- capture="user"
|
|
|
|
|
- accept="image/*"
|
|
|
|
|
- hidden
|
|
|
|
|
- :onchange="innerContentsInput"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </van-dialog>
|
|
|
|
|
- </van-tabs>
|
|
|
|
|
|
|
+ <van-row>
|
|
|
|
|
+ <van-col span="12">
|
|
|
|
|
+ <van-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ block
|
|
|
|
|
+ @click="invokeCameraToCapture('外箱图')"
|
|
|
|
|
+ >外箱图录入
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ </van-col>
|
|
|
|
|
+ <van-col span="12">
|
|
|
|
|
+ <van-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ block
|
|
|
|
|
+ @click="invokeCameraToCapture('内物图')"
|
|
|
|
|
+ >内物图录入
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ </van-col>
|
|
|
|
|
+ </van-row>
|
|
|
|
|
+
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="file"
|
|
|
|
|
+ id="outer-carton-box-input"
|
|
|
|
|
+ capture="user"
|
|
|
|
|
+ accept="image/*"
|
|
|
|
|
+ hidden
|
|
|
|
|
+ @onchange="outerCartonInput"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="file"
|
|
|
|
|
+ id="inner-contents-input"
|
|
|
|
|
+ capture="user"
|
|
|
|
|
+ accept="image/*"
|
|
|
|
|
+ hidden
|
|
|
|
|
+ @onchange="innerContentsInput"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </van-dialog>
|
|
|
|
|
+
|
|
|
<van-popup
|
|
<van-popup
|
|
|
v-model:show="showOwnerSelect"
|
|
v-model:show="showOwnerSelect"
|
|
|
destroy-on-close
|
|
destroy-on-close
|
|
@@ -691,7 +681,7 @@ import {
|
|
|
showLoadingToast,
|
|
showLoadingToast,
|
|
|
closeToast,
|
|
closeToast,
|
|
|
showConfirmDialog,
|
|
showConfirmDialog,
|
|
|
- showImagePreview
|
|
|
|
|
|
|
+ showImagePreview,
|
|
|
} from 'vant'
|
|
} from 'vant'
|
|
|
import { getHeader, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
import { getHeader, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
|
import {
|
|
import {
|
|
@@ -894,7 +884,7 @@ const qualityStatus = ref('')
|
|
|
const params = ref({
|
|
const params = ref({
|
|
|
id: null,
|
|
id: null,
|
|
|
returnNo: null,
|
|
returnNo: null,
|
|
|
- warehouseCode: null,
|
|
|
|
|
|
|
+ warehouseCode: warehouse,
|
|
|
logisticsName: null,
|
|
logisticsName: null,
|
|
|
storeName: null,
|
|
storeName: null,
|
|
|
upstreamNo: null,
|
|
upstreamNo: null,
|
|
@@ -1038,7 +1028,7 @@ function getOwnerName(owner) {
|
|
|
|
|
|
|
|
// 仓库名
|
|
// 仓库名
|
|
|
function getWarehouseName() {
|
|
function getWarehouseName() {
|
|
|
- console.log()
|
|
|
|
|
|
|
+ console.log(params.value.warehouseCode)
|
|
|
return warehousesMap.value[params.value.warehouseCode]
|
|
return warehousesMap.value[params.value.warehouseCode]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1056,7 +1046,7 @@ function inputExpressNo() {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
params.value.returnNo = express_no
|
|
params.value.returnNo = express_no
|
|
|
- params.value.warehouseCode = warehouse.value
|
|
|
|
|
|
|
+ params.value.warehouseCode = warehouse
|
|
|
listAsn(express_no).then((res) => {
|
|
listAsn(express_no).then((res) => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
asnList.value = res.data
|
|
asnList.value = res.data
|
|
@@ -1246,19 +1236,23 @@ function matchAsn(expressNo) {
|
|
|
function checkExpressNo(no) {
|
|
function checkExpressNo(no) {
|
|
|
if (!no || no.length === 0) {
|
|
if (!no || no.length === 0) {
|
|
|
showFailToast('单号长度异常')
|
|
showFailToast('单号长度异常')
|
|
|
|
|
+ scanError()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
if (no.startsWith('http')) {
|
|
if (no.startsWith('http')) {
|
|
|
showFailToast('扫描到了错误的条码')
|
|
showFailToast('扫描到了错误的条码')
|
|
|
|
|
+ scanError()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
if (no.endsWith('.com')) {
|
|
if (no.endsWith('.com')) {
|
|
|
showFailToast('扫描到了错误的条码')
|
|
showFailToast('扫描到了错误的条码')
|
|
|
|
|
+ scanError()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
const length = no.length
|
|
const length = no.length
|
|
|
if (length > 30 || length < 5) {
|
|
if (length > 30 || length < 5) {
|
|
|
showFailToast('单号长度异常')
|
|
showFailToast('单号长度异常')
|
|
|
|
|
+ scanError()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
return true
|
|
return true
|
|
@@ -1621,14 +1615,12 @@ function removeDetails(index) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function selectOwner({ selectedValues }) {
|
|
function selectOwner({ selectedValues }) {
|
|
|
- const ownerCode = selectedValues[0].value
|
|
|
|
|
- params.value.ownerCode = selectedValues[0]
|
|
|
|
|
|
|
+ const ownerCode = selectedValues[0]
|
|
|
|
|
+ params.value.ownerCode = ownerCode
|
|
|
showOwnerSelect.value = false
|
|
showOwnerSelect.value = false
|
|
|
ownerSelectedOptions.value = []
|
|
ownerSelectedOptions.value = []
|
|
|
- const barcode = scancode.value
|
|
|
|
|
- searchOwnerBarcode({ ownerCode, barcode })
|
|
|
|
|
getStoreOptionsBy(ownerCode)
|
|
getStoreOptionsBy(ownerCode)
|
|
|
- // 货主
|
|
|
|
|
|
|
+ queryOwnerBarcode(params.value.ownerCode, scancode.value)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const ownerRef = ref(null)
|
|
const ownerRef = ref(null)
|
|
@@ -1944,7 +1936,7 @@ const handlePhotosDelete = () => {
|
|
|
message: '确定要删除这张图片吗?',
|
|
message: '确定要删除这张图片吗?',
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- selectDetail.value.productPhotos.splice(startBoxPosition.value, 1)
|
|
|
|
|
|
|
+ selectDetail.value.productPhotos.splice(startPhotosPosition.value, 1)
|
|
|
showNotify({ type: 'success', message: '删除成功' })
|
|
showNotify({ type: 'success', message: '删除成功' })
|
|
|
if (selectDetail.value.productPhotos.length === 0) {
|
|
if (selectDetail.value.productPhotos.length === 0) {
|
|
|
showPhotosPreview.value = false
|
|
showPhotosPreview.value = false
|
|
@@ -2008,7 +2000,7 @@ const detailProductImages = computed(() => {
|
|
|
if (!items || items.length === 0) {
|
|
if (!items || items.length === 0) {
|
|
|
return []
|
|
return []
|
|
|
}
|
|
}
|
|
|
- return boxFiles.value
|
|
|
|
|
|
|
+ return productFiles.value
|
|
|
.filter((item) => {
|
|
.filter((item) => {
|
|
|
return items.includes(item.fileName)
|
|
return items.includes(item.fileName)
|
|
|
})
|
|
})
|