修改销售订单

This commit is contained in:
Mrking 2025-01-19 15:53:09 +08:00
parent 97678c49d2
commit d35965748c
1 changed files with 32 additions and 4 deletions

View File

@ -22,7 +22,7 @@
<!-- 订单信息 -->
<el-descriptions title="订单信息">
<el-descriptions-item label="订单号: " width="1000px">{{ formData.billno }}</el-descriptions-item>
<el-descriptions-item label="合约类型: " width="1000px" v-if="formData.billStatus == 'B'">
<!-- <el-descriptions-item label="合约类型: " width="1000px" v-if="formData.billStatus == 'B'">
<template v-slot:label>
<span>合约类型<span style="color: red;">*</span></span>
</template>
@ -40,7 +40,14 @@
/>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="合约类型: " width="1000px" v-else>{{ formData.contractType }}</el-descriptions-item>
<el-descriptions-item label="合约类型: " width="1000px" v-else>{{ formData.contractType }}</el-descriptions-item>-->
<el-descriptions-item label="销售合约号: " width="1000px" v-if="formData.billStatus == 'B'">
<template v-slot:label>
<span>销售合约号<span style="color: red;">*</span></span>
</template>
<el-input v-model="formData.saleContractCode" placeholder="请输入销售合约号" class="!w-300px" />
</el-descriptions-item>
<el-descriptions-item label="销售合约号: " width="1000px" v-else>{{ formData.saleContractCode }}</el-descriptions-item>
<el-descriptions-item label="业务日期: " width="500px">{{ formatDate(formData.bizdate,'YYYY-MM-DD') }}</el-descriptions-item>
<el-descriptions-item label="确认日期: " >{{ formatDate(formData.confirmdate,'YYYY-MM-DD') }}</el-descriptions-item>
<el-descriptions-item label="计划日期: " >{{ formatDate(formData.plansenddate,'YYYY-MM-DD') }}</el-descriptions-item>
@ -136,7 +143,28 @@
<el-table-column label="产品编码" prop="materialName" width="150"/>
<el-table-column label="产品名称" prop="materialName" width="150"/>
<el-table-column label="产品规格" prop="materialSpec" width="150" />
<el-table-column label="数量" prop="qty" width="150" />
<el-table-column label="数量" width="250" v-if="formData.billStatus == 'B'">
<template #header>
<span>数量</span>
<span style="color:red; margin-right:4px">*</span>
</template>
<template #default="{ row, $index }">
<el-form-item :prop="`${$index}.qty`" :rules="itemFormEntrysRules.qty" class="mb-0px!"
v-if="row.billStatus!='C'"
>
<el-input-number
style="width: 100%"
v-model.number="row.qty"
:precision="0"
:controls="false"
@change="changeRow(row,'qty')"
placeholder="请输入数量"
/>
</el-form-item>
<span v-else @click="editRow($index)">{{ row.qty }}</span>
</template>
</el-table-column>
<el-table-column label="数量" prop="qty" width="150" v-else/>
<el-table-column label="单价" width="250" v-if="formData.billStatus == 'B'">
<template #header>
<span>单价</span>
@ -258,7 +286,7 @@ const updateAddress = () => {
}
const changeRow = async (row,key:string) => {
if('price' == key || 'discount' == key ){
if('price' == key || 'discount' == key || 'qty' == key){
let price = row.price
let qty = row.qty
let discount = row.discount