This commit is contained in:
qsh
2024-11-01 18:13:44 +08:00
parent 7e771a89e4
commit 91a509d49d
10 changed files with 280 additions and 53 deletions

View File

@@ -147,6 +147,15 @@
>
发货
</el-button>
<el-button
type="danger"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:remove-product']"
@click="handleRemoveProduct(scope.row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -228,6 +237,16 @@
>
取消登记
</el-button>
<el-button
type="primary"
class="mr-10px"
link
style="padding: 0; margin-left: 0"
v-hasPermi="['clue:order:add-product']"
@click="handleAddProduct(scope.row)"
>
添加产品
</el-button>
</template>
</el-table-column>
</SSTable>
@@ -238,6 +257,7 @@
<DialogAfterSale ref="afterSaleDialog" />
<DialogExtraFee ref="extraFeeDialog" />
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
<DialogAddProduct ref="addProductDialog" @success="getTableList" />
</div>
</template>
@@ -252,6 +272,7 @@ import DialogFeeback from './DialogFeeback.vue'
import DialogAfterSale from './DialogAfterSale.vue'
import DialogExtraFee from './DialogExtraPay.vue'
import DialogDelivery from './DialogDelivery.vue'
import DialogAddProduct from './DialogAddProduct.vue'
import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
@@ -404,6 +425,11 @@ function handleDelivery(row) {
deliveryDialog.value.open(row)
}
const addProductDialog = ref()
function handleAddProduct(row) {
addProductDialog.value.open(row.signId, prodOptions.value)
}
const batchIds = ref([])
function handleSelectionChange(val) {
batchIds.value = val.map((it) => it.signId)
@@ -460,6 +486,18 @@ function handleBatchUpdateInstall() {
}
}
async function handleRemoveProduct(row) {
try {
// 修改状态的二次确认
await message.confirm(`确认要删除${row.productName}吗?`)
// 发起修改状态
await SignApi.removeOrderProduct(row.id)
message.success('删除成功')
// 刷新列表
getTableList()
} catch {}
}
async function handleChangeProdoce(row) {
try {
// 修改状态的二次确认