qsh 3 months ago
commit 5eccb83e3f
  1. 42
      src/views/Clue/Order/Comp/DialogDelivery.vue
  2. 15
      src/views/Clue/Order/Comp/Reback.vue

@ -77,6 +77,32 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12" :offset="0">
<el-form-item label="其他支出">
<el-select v-model="extraPay.extraPayType" placeholder="其他支出类型" filterable>
<el-option
v-for="item in extraPayOptions"
:key="item.id"
:label="item.extraPayName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="支出金额">
<el-input-number v-model="extraPay.extraPayMoney" :controls="false" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24" :offset="0">
<el-form-item label="支出备注">
<el-input v-model="extraPay.remark" placeholder="备注信息" />
</el-form-item>
</el-col>
</el-row>
</template> </template>
<template v-else> <template v-else>
<el-table :data="inventoryList" @selection-change="handleSelectionChange"> <el-table :data="inventoryList" @selection-change="handleSelectionChange">
@ -98,7 +124,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
<el-form-item label="备注"> <el-form-item label="发货备注">
<Editor v-model:modelValue="form.remark" /> <Editor v-model:modelValue="form.remark" />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -116,15 +142,20 @@ import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/wareh
import { createDelivery } from '@/api/clue/delivery' import { createDelivery } from '@/api/clue/delivery'
import { getConfigList } from '@/api/system/set' import { getConfigList } from '@/api/system/set'
import { getDictOptions } from '@/utils/dict' import { getDictOptions } from '@/utils/dict'
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
const message = useMessage() // const message = useMessage() //
const warehouseOptions = ref([]) const warehouseOptions = ref([])
const extraPayOptions = ref([])
const supplierOptions = getDictOptions('erp_supplier') const supplierOptions = getDictOptions('erp_supplier')
function getOptions() { function getOptions() {
getSimpleWarehouseList().then((data) => { getSimpleWarehouseList().then((data) => {
warehouseOptions.value = data warehouseOptions.value = data
}) })
getExtraFeeSimpleList().then((data) => {
extraPayOptions.value = data
})
} }
function getRemainInventory(signProductId) { function getRemainInventory(signProductId) {
@ -144,6 +175,7 @@ defineExpose({
}) })
const form = ref({}) const form = ref({})
const extraPay = ref({})
const rules = ref({ const rules = ref({
supplier: { required: true, message: '供应商不可为空', trigger: 'change' }, supplier: { required: true, message: '供应商不可为空', trigger: 'change' },
warehouseId: { required: true, message: '仓库不可为空', trigger: 'change' }, warehouseId: { required: true, message: '仓库不可为空', trigger: 'change' },
@ -164,6 +196,11 @@ function resetForm(row) {
unitPrice: undefined, unitPrice: undefined,
remark: undefined remark: undefined
} }
extraPay.value = {
extraPayType: undefined,
extraPayMoney: undefined,
remark: undefined
}
} }
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
@ -209,6 +246,9 @@ async function onSubmit() {
unitPrice: form.value.unitPrice, unitPrice: form.value.unitPrice,
warehouseId: form.value.warehouseId warehouseId: form.value.warehouseId
} }
if (extraPay.value.extraPayMoney) {
params.purchaseOrder.extraPay = [extraPay.value]
}
} else { } else {
params.detailList = deliveryArr.value params.detailList = deliveryArr.value
} }

@ -186,7 +186,15 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="signPrice" label="成交价" min-width="90" /> <el-table-column prop="signPrice" label="成交价" min-width="90" />
<el-table-column prop="isPayoff" label="是否结清" min-width="90" /> <el-table-column prop="isPayoff" label="是否结清" min-width="90">
<template #default="{ row }">
<el-select v-if="row.edit" size="small" v-model="row.isPayoffValue">
<el-option label="结清" :value="true" />
<el-option label="未结清" :value="false" />
</el-select>
<div v-else>{{ row.isPayoff }}</div>
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="appStore.getAppInfo?.instanceType == 1" v-if="appStore.getAppInfo?.instanceType == 1"
prop="receiverName" prop="receiverName"
@ -429,16 +437,19 @@ async function handleUpdate(row) {
id: row.id, id: row.id,
money: row.money, money: row.money,
companyProfit: row.companyProfit, companyProfit: row.companyProfit,
personProfit: row.personProfit personProfit: row.personProfit,
isPayoff: row.isPayoffValue
}) })
.then(() => { .then(() => {
message.success('修改成功') message.success('修改成功')
getList()
}) })
.finally(() => { .finally(() => {
row.edit = false row.edit = false
}) })
} else { } else {
row.edit = true row.edit = true
row.isPayoffValue = row.isPayoff == '结清'
} }
} }

Loading…
Cancel
Save