Merge branch 'main' of http://114.55.169.15:3000/qiushanhe/ss-crm-manage-web into dev-cjl
This commit is contained in:
@@ -77,6 +77,32 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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 v-else>
|
||||
<el-table :data="inventoryList" @selection-change="handleSelectionChange">
|
||||
@@ -98,7 +124,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<el-form-item label="备注">
|
||||
<el-form-item label="发货备注">
|
||||
<Editor v-model:modelValue="form.remark" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -116,15 +142,20 @@ import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/wareh
|
||||
import { createDelivery } from '@/api/clue/delivery'
|
||||
import { getConfigList } from '@/api/system/set'
|
||||
import { getDictOptions } from '@/utils/dict'
|
||||
import { getExtraFeeSimpleList } from '@/api/clue/extraFee'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const warehouseOptions = ref([])
|
||||
const extraPayOptions = ref([])
|
||||
const supplierOptions = getDictOptions('erp_supplier')
|
||||
function getOptions() {
|
||||
getSimpleWarehouseList().then((data) => {
|
||||
warehouseOptions.value = data
|
||||
})
|
||||
getExtraFeeSimpleList().then((data) => {
|
||||
extraPayOptions.value = data
|
||||
})
|
||||
}
|
||||
|
||||
function getRemainInventory(signProductId) {
|
||||
@@ -144,6 +175,7 @@ defineExpose({
|
||||
})
|
||||
|
||||
const form = ref({})
|
||||
const extraPay = ref({})
|
||||
const rules = ref({
|
||||
supplier: { required: true, message: '供应商不可为空', trigger: 'change' },
|
||||
warehouseId: { required: true, message: '仓库不可为空', trigger: 'change' },
|
||||
@@ -164,6 +196,11 @@ function resetForm(row) {
|
||||
unitPrice: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
extraPay.value = {
|
||||
extraPayType: undefined,
|
||||
extraPayMoney: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
}
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
@@ -209,6 +246,9 @@ async function onSubmit() {
|
||||
unitPrice: form.value.unitPrice,
|
||||
warehouseId: form.value.warehouseId
|
||||
}
|
||||
if (extraPay.value.extraPayMoney) {
|
||||
params.purchaseOrder.extraPay = [extraPay.value]
|
||||
}
|
||||
} else {
|
||||
params.detailList = deliveryArr.value
|
||||
}
|
||||
|
||||
@@ -186,7 +186,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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
|
||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
||||
prop="receiverName"
|
||||
@@ -429,16 +437,19 @@ async function handleUpdate(row) {
|
||||
id: row.id,
|
||||
money: row.money,
|
||||
companyProfit: row.companyProfit,
|
||||
personProfit: row.personProfit
|
||||
personProfit: row.personProfit,
|
||||
isPayoff: row.isPayoffValue
|
||||
})
|
||||
.then(() => {
|
||||
message.success('修改成功')
|
||||
getList()
|
||||
})
|
||||
.finally(() => {
|
||||
row.edit = false
|
||||
})
|
||||
} else {
|
||||
row.edit = true
|
||||
row.isPayoffValue = row.isPayoff == '结清'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user