|
@@ -137,15 +137,27 @@ async function onSubmit() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- loading.value = true
|
|
|
|
|
|
+ if( Number(detailTask.data.balance_num) !== Number(total.value)){
|
|
|
|
+ ElMessage.warning('操作数量必须等于待处理数量')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const list = formData.value.goods.filter(item => !!item.num)
|
|
|
|
+
|
|
|
|
|
|
|
|
+ if(list.length !== 0){
|
|
|
|
+ ElMessage.warning('商品操作数量不能为空')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ loading.value = true
|
|
const { code, message } = await httpStatus({
|
|
const { code, message } = await httpStatus({
|
|
relaArr,
|
|
relaArr,
|
|
manager_id: id.value,
|
|
manager_id: id.value,
|
|
is_checkOrder: hasJT.value ? '1' : '0',
|
|
is_checkOrder: hasJT.value ? '1' : '0',
|
|
fz_date: formData.value.month
|
|
fz_date: formData.value.month
|
|
})
|
|
})
|
|
-
|
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
|
|
|
if (code == 0) {
|
|
if (code == 0) {
|
|
@@ -164,30 +176,22 @@ function handleEditGood(index, data) {
|
|
formData.value.goods.forEach((item, index) => {
|
|
formData.value.goods.forEach((item, index) => {
|
|
if (item.id === id) {
|
|
if (item.id === id) {
|
|
formData.value.goods[index].goodNum = data.goodNum
|
|
formData.value.goods[index].goodNum = data.goodNum
|
|
|
|
+ const { goodNum, residue_stock } = data
|
|
|
|
+ formData.value.goods[index].isJT = goodNum > residue_stock
|
|
if (formData.value.goods[index].childNum) {
|
|
if (formData.value.goods[index].childNum) {
|
|
|
|
+ formData.value.goods[index].isJT = goodNum > residue_stock
|
|
formData.value.goods[index].childActionNum = formData.value.goods[index].childNum * data.goodNum
|
|
formData.value.goods[index].childActionNum = formData.value.goods[index].childNum * data.goodNum
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
function handleShowDetail(id, index){
|
|
function handleShowDetail(id, index){
|
|
productVisible.value = true
|
|
productVisible.value = true
|
|
productIndex.value = index
|
|
productIndex.value = index
|
|
productDetailTask.run(httpProductDetail({ id }))
|
|
productDetailTask.run(httpProductDetail({ id }))
|
|
}
|
|
}
|
|
|
|
|
|
-function handleAddTJProduct(){
|
|
|
|
- if(hasJT.value){
|
|
|
|
- ElMessage.warning('只能添加一条计提商品')
|
|
|
|
- return
|
|
|
|
- } else {
|
|
|
|
- isJT.value = true
|
|
|
|
- visible.value = true
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
function handleDelete(index) {
|
|
function handleDelete(index) {
|
|
const { id } = formData.value.goods[index]
|
|
const { id } = formData.value.goods[index]
|
|
formData.value.goods = formData.value.goods.filter((item) => item.id !== id)
|
|
formData.value.goods = formData.value.goods.filter((item) => item.id !== id)
|
|
@@ -204,7 +208,7 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
<BasicDescriptions :columns="orderGoodColumns" :data="detailTask.data" v-if="detailTask.data" />
|
|
<BasicDescriptions :columns="orderGoodColumns" :data="detailTask.data" v-if="detailTask.data" />
|
|
</ElCollapseItem>
|
|
</ElCollapseItem>
|
|
|
|
|
|
- <ElCollapseItem :title="'订单详情'" name="2">
|
|
|
|
|
|
+ <ElCollapseItem title="订单详情" name="2">
|
|
<BasicDescriptions v-if="detailTask.data" :columns="importOrderGoodColumns" :data="detailTask.data" />
|
|
<BasicDescriptions v-if="detailTask.data" :columns="importOrderGoodColumns" :data="detailTask.data" />
|
|
</ElCollapseItem>
|
|
</ElCollapseItem>
|
|
|
|
|
|
@@ -217,7 +221,7 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
<ElTableColumn label="商品ID" prop="product_id" width="60px" show-overflow-tooltip />
|
|
<ElTableColumn label="商品ID" prop="product_id" width="60px" show-overflow-tooltip />
|
|
<ElTableColumn label="商品编号" prop="skuCode" show-overflow-tooltip />
|
|
<ElTableColumn label="商品编号" prop="skuCode" show-overflow-tooltip />
|
|
<ElTableColumn label="商品名称" prop="goodName" show-overflow-tooltip />
|
|
<ElTableColumn label="商品名称" prop="goodName" show-overflow-tooltip />
|
|
- <ElTableColumn label="操作数量" prop="num" show-overflow-tooltip />
|
|
|
|
|
|
+ <ElTableColumn label="操作数量" prop="num" width="60px" show-overflow-tooltip />
|
|
<ElTableColumn label="创建时间" prop="create_time" show-overflow-tooltip />
|
|
<ElTableColumn label="创建时间" prop="create_time" show-overflow-tooltip />
|
|
<ElTableColumn label="操作" width="100px">
|
|
<ElTableColumn label="操作" width="100px">
|
|
<template #="scope">
|
|
<template #="scope">
|
|
@@ -233,7 +237,7 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
<ElCollapseItem name="5" title="待处理信息" v-if="!isSuperUser && detailTask.data && (detailTask.data.status == '1' || detailTask.data.status == '4')">
|
|
<ElCollapseItem name="5" title="待处理信息" v-if="!isSuperUser && detailTask.data && (detailTask.data.status == '1' || detailTask.data.status == '4')">
|
|
<div class="w-full flex justify-between mb-[10px]">
|
|
<div class="w-full flex justify-between mb-[10px]">
|
|
<p>待处理 {{ Number(detailTask.data.balance_num) }} / {{ total }}</p>
|
|
<p>待处理 {{ Number(detailTask.data.balance_num) }} / {{ total }}</p>
|
|
- <ElButton type="primary" size="small" @click="handleAddTJProduct">添加计提商品</ElButton>
|
|
|
|
|
|
+ <!-- <ElButton type="primary" size="small" @click="handleAddTJProduct">添加计提商品</ElButton> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<ElForm ref="formRef" :rules="rules" :model="formData">
|
|
<ElForm ref="formRef" :rules="rules" :model="formData">
|
|
@@ -242,7 +246,6 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
<ElTableColumn label="商品ID" prop="id" width="60px" show-overflow-tooltip />
|
|
<ElTableColumn label="商品ID" prop="id" width="60px" show-overflow-tooltip />
|
|
<ElTableColumn label="商品编号" prop="skuCode" show-overflow-tooltip />
|
|
<ElTableColumn label="商品编号" prop="skuCode" show-overflow-tooltip />
|
|
<ElTableColumn label="商品名称" prop="goodName" show-overflow-tooltip />
|
|
<ElTableColumn label="商品名称" prop="goodName" show-overflow-tooltip />
|
|
- <ElTableColumn label="操作数量" prop="goodNum" show-overflow-tooltip />
|
|
|
|
|
|
|
|
<ElTableColumn label="是否为计提" prop="residue_stock" width="80px" show-overflow-tooltip>
|
|
<ElTableColumn label="是否为计提" prop="residue_stock" width="80px" show-overflow-tooltip>
|
|
<template #="{ row }">
|
|
<template #="{ row }">
|
|
@@ -251,8 +254,10 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
</ElTableColumn>
|
|
</ElTableColumn>
|
|
|
|
|
|
<ElTableColumn label="结存数" prop="residue_stock" width="80px" show-overflow-tooltip />
|
|
<ElTableColumn label="结存数" prop="residue_stock" width="80px" show-overflow-tooltip />
|
|
|
|
+ <ElTableColumn label="操作数量" prop="goodNum" show-overflow-tooltip />
|
|
|
|
+
|
|
<ElTableColumn label="子商品编号" prop="childCode" show-overflow-tooltip />
|
|
<ElTableColumn label="子商品编号" prop="childCode" show-overflow-tooltip />
|
|
- <ElTableColumn label="销售方公司纳税识别号" width="140px" prop="seller_code" show-overflow-tooltip />
|
|
|
|
|
|
+ <!-- <ElTableColumn label="销售方公司纳税识别号" width="140px" prop="seller_code" show-overflow-tooltip /> -->
|
|
<ElTableColumn label="子商品比例" prop="childNum" show-overflow-tooltip />
|
|
<ElTableColumn label="子商品比例" prop="childNum" show-overflow-tooltip />
|
|
<ElTableColumn label="子商品操作数量" prop="childActionNum" width="110px" show-overflow-tooltip />
|
|
<ElTableColumn label="子商品操作数量" prop="childActionNum" width="110px" show-overflow-tooltip />
|
|
|
|
|
|
@@ -282,7 +287,6 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
</ElTable>
|
|
</ElTable>
|
|
</ElFormItem>
|
|
</ElFormItem>
|
|
|
|
|
|
- <!-- :company_code="detailTask.data.buyer_code" -->
|
|
|
|
<ElFormItem label="入账月份" prop="month">
|
|
<ElFormItem label="入账月份" prop="month">
|
|
<SealMonthPicker placeholder="入账月份" v-model="formData.month" />
|
|
<SealMonthPicker placeholder="入账月份" v-model="formData.month" />
|
|
</ElFormItem>
|
|
</ElFormItem>
|
|
@@ -294,10 +298,16 @@ id.value && detailTask.run(httpDetail({ id: id.value }))
|
|
</ElCollapseItem>
|
|
</ElCollapseItem>
|
|
</ElCollapse>
|
|
</ElCollapse>
|
|
|
|
|
|
- <ChooseGoodModal v-model:visible="visible" :isJT="isJT" :otherSearchParameter="searchParameter"
|
|
|
|
|
|
+ <ChooseGoodModal
|
|
|
|
+ v-model:visible="visible"
|
|
|
|
+ :isJT="isJT"
|
|
|
|
+ :otherSearchParameter="searchParameter"
|
|
@submit="handleGoodComfirm" :skuCode="notJTList.length === 0 ? '' : notJTList[0].skuCode" />
|
|
@submit="handleGoodComfirm" :skuCode="notJTList.length === 0 ? '' : notJTList[0].skuCode" />
|
|
|
|
|
|
- <ChildGoodEditModal :data="state.data" :index="state.index" v-model:visible="state.editVisible"
|
|
|
|
|
|
+ <ChildGoodEditModal
|
|
|
|
+ :data="state.data"
|
|
|
|
+ :index="state.index"
|
|
|
|
+ v-model:visible="state.editVisible"
|
|
@submit="handleEditGood" />
|
|
@submit="handleEditGood" />
|
|
|
|
|
|
<ElDialog center title="商品详情" v-model="productVisible" style="overflow: hidden">
|
|
<ElDialog center title="商品详情" v-model="productVisible" style="overflow: hidden">
|