|
@@ -292,181 +292,6 @@
|
|
|
</template>
|
|
|
<template #commodity>
|
|
|
<div
|
|
|
- style="width: 100%; padding: 15px; border: 1px solid #eee"
|
|
|
- v-if="
|
|
|
- formData.data.purchaseProductList &&
|
|
|
- formData.data.purchaseProductList.length > 0
|
|
|
- "
|
|
|
- >
|
|
|
- <el-row
|
|
|
- style="
|
|
|
- margin-bottom: 15px;
|
|
|
- background: #eeeeee;
|
|
|
- font-weight: 700;
|
|
|
- padding: 10px;
|
|
|
- "
|
|
|
- >
|
|
|
- <el-col :span="14">货品信息</el-col>
|
|
|
- <el-col :span="4"
|
|
|
- >订单总数:{{ formData.data.purchaseProductList.length }}</el-col
|
|
|
- >
|
|
|
- <el-col :span="6">订单总金额:{{ getTotalAmount() }}</el-col>
|
|
|
- </el-row>
|
|
|
- <template
|
|
|
- v-for="(item, index) in formData.data.purchaseProductList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div style="width: 100%">
|
|
|
- <el-table
|
|
|
- :data="item.purchaseProductMountingsList"
|
|
|
- :style="
|
|
|
- index !== formData.data.purchaseProductList.length - 1
|
|
|
- ? 'margin-bottom: 15px'
|
|
|
- : ''
|
|
|
- "
|
|
|
- >
|
|
|
- <!-- :span-method=" ({ rowIndex, columnIndex }) =>
|
|
|
- objectSpanMethod(rowIndex, columnIndex, item) " -->
|
|
|
- <el-table-column label="货品信息" align="left">
|
|
|
- <template #default="{ row }">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <div style="width: 50px; height: 50px">
|
|
|
- <img
|
|
|
- v-if="row.fileUrl"
|
|
|
- :src="row.fileUrl"
|
|
|
- class="pic"
|
|
|
- @click="onPicture(row.fileUrl)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div style="margin-left: 20px">
|
|
|
- <div>{{ row.productName }}</div>
|
|
|
- <div style="display: flex; color: #999999">
|
|
|
- <span
|
|
|
- >类型:
|
|
|
- {{
|
|
|
- dictValueLabel(row.productType, productType)
|
|
|
- }}</span
|
|
|
- ><span style="margin-left: 20px"
|
|
|
- >尺寸:{{ row.productModel }}</span
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="数量"
|
|
|
- align="left"
|
|
|
- prop="quantity"
|
|
|
- width="180"
|
|
|
- >
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%" class="removePadding">
|
|
|
- <el-form-item
|
|
|
- :prop="
|
|
|
- 'purchaseProductList.' +
|
|
|
- index +
|
|
|
- '.purchaseProductMountingsList.' +
|
|
|
- $index +
|
|
|
- '.quantity'
|
|
|
- "
|
|
|
- :rules="rules.quantity"
|
|
|
- :inline-message="true"
|
|
|
- @change="
|
|
|
- () => {
|
|
|
- return changeProductMaterial(index, $index);
|
|
|
- }
|
|
|
- "
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.quantity"
|
|
|
- placeholder="请输入数量"
|
|
|
- :precision="0"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="单价"
|
|
|
- align="left"
|
|
|
- prop="price"
|
|
|
- width="180"
|
|
|
- >
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%" class="removePadding">
|
|
|
- <el-form-item
|
|
|
- :prop="
|
|
|
- 'purchaseProductList.' +
|
|
|
- index +
|
|
|
- '.purchaseProductMountingsList.' +
|
|
|
- $index +
|
|
|
- '.price'
|
|
|
- "
|
|
|
- :rules="rules.price"
|
|
|
- :inline-message="true"
|
|
|
- @change="
|
|
|
- () => {
|
|
|
- return changeProductMaterial(index, $index);
|
|
|
- }
|
|
|
- "
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.price"
|
|
|
- placeholder="请输入单价"
|
|
|
- :precision="2"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="金额小计"
|
|
|
- align="left"
|
|
|
- width="140"
|
|
|
- prop="amount"
|
|
|
- />
|
|
|
- <el-table-column label="操作" align="center" width="100">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div v-if="$index === 0">
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- text
|
|
|
- @click="handleHandover(item, index)"
|
|
|
- >备注</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- text
|
|
|
- @click="handleMaterial(index)"
|
|
|
- >添加配件</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- link
|
|
|
- @click="handleRemove(index, $index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <!-- <div
|
|
|
style="width: 100%"
|
|
|
v-if="
|
|
|
formData.data.purchaseProductList &&
|
|
@@ -490,31 +315,41 @@
|
|
|
"
|
|
|
>
|
|
|
<el-row
|
|
|
- style="width: 100%"
|
|
|
+ style="
|
|
|
+ width: 100%;
|
|
|
+ font-weight: 700;
|
|
|
+ background: #eee;
|
|
|
+ line-height: 50px;
|
|
|
+ "
|
|
|
:gutter="5"
|
|
|
type="flex"
|
|
|
align="middle"
|
|
|
>
|
|
|
- <el-col :span="2" style="text-align: center">
|
|
|
+ <el-col :span="1" style="text-align: center">
|
|
|
<img
|
|
|
v-if="item.fileUrl"
|
|
|
:src="item.fileUrl"
|
|
|
class="pic"
|
|
|
+ style="width: 30px; height: 30px"
|
|
|
@click="onPicture(item.fileUrl)"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <el-col :span="5">
|
|
|
+ <el-col :span="4">
|
|
|
<span>产品名称: {{ item.productName }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<span>尺寸: {{ item.productModel }}</span>
|
|
|
</el-col>
|
|
|
- <el-col :span="3">
|
|
|
+ <el-col :span="3"> </el-col>
|
|
|
+ <el-col :span="2">
|
|
|
<span>数量: {{ item.quantity }}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
<span>单价: {{ item.price }}</span>
|
|
|
</el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <span>金额小计: {{ item.amount }}</span>
|
|
|
+ </el-col>
|
|
|
<el-col :span="2">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -528,9 +363,6 @@
|
|
|
>添加配件</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
- <el-col :span="3">
|
|
|
- <span>金额小计: {{ item.amount }}</span>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
<el-collapse
|
|
|
v-model="item.activeName"
|
|
@@ -657,7 +489,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="item.activeName = !item.activeName"
|
|
|
- style="margin-bottom: -28px"
|
|
|
+ style="margin-bottom: -28px; background: #fff"
|
|
|
text
|
|
|
>
|
|
|
<span v-if="item.activeName">
|
|
@@ -686,7 +518,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template #otherCharge>
|
|
|
<div style="width: 100%">
|
|
@@ -1601,7 +1433,9 @@ defineExpose({
|
|
|
onMounted(() => {
|
|
|
if (props.queryData.ids) {
|
|
|
proxy.post("/delivery/page", { ids: props.queryData.ids }).then((res) => {
|
|
|
+ let arr = props.queryData.ids.split(",") || [];
|
|
|
formData.data.dataResource = props.queryData.type;
|
|
|
+ formData.data.dataResourceId = arr[0];
|
|
|
if (res.rows && res.rows.length > 0) {
|
|
|
formData.data.purchaseProductList = res.rows.map((item) => {
|
|
|
return {
|
|
@@ -1688,6 +1522,7 @@ onMounted(() => {
|
|
|
for (const key in res) {
|
|
|
formData.data[key] = res[key];
|
|
|
}
|
|
|
+
|
|
|
proxy
|
|
|
.post("/fileInfo/getList", {
|
|
|
businessIdList: [businessId],
|
|
@@ -1707,6 +1542,7 @@ onMounted(() => {
|
|
|
formData.data.purchaseProductList.length > 0
|
|
|
) {
|
|
|
let ids = formData.data.purchaseProductList.map((x) => x.productId);
|
|
|
+ getAuxiliaryData(formData.data.sellCorporationId, ids);
|
|
|
proxy
|
|
|
.post("/fileInfo/getList", {
|
|
|
businessIdList: ids,
|
|
@@ -2074,36 +1910,6 @@ const remoteMethod = (keyword) => {
|
|
|
}
|
|
|
return;
|
|
|
};
|
|
|
-
|
|
|
-const objectSpanMethod = (rowIndex, columnIndex, item) => {
|
|
|
- if (columnIndex === 3) {
|
|
|
- if (rowIndex === 0) {
|
|
|
- return {
|
|
|
- rowspan: item.purchaseProductMountingsList.length,
|
|
|
- colspan: 1,
|
|
|
- };
|
|
|
- } else {
|
|
|
- return {
|
|
|
- rowspan: 0,
|
|
|
- colspan: 1,
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-const getTotalAmount = () => {
|
|
|
- const total = formData.data.purchaseProjectList.reduce(
|
|
|
- (val, x) => (val += Number(x.amount)),
|
|
|
- 0
|
|
|
- );
|
|
|
- if (total) {
|
|
|
- return parseFloat(formData.data.amount - total).toFixed(2);
|
|
|
- } else {
|
|
|
- if (formData.data.amount) {
|
|
|
- return parseFloat(formData.data.amount).toFixed(2);
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|