|
@@ -64,7 +64,22 @@
|
|
<el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
- <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="right" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip>
|
|
|
|
+
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <template v-if="edit">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="scope.row.refundableQty"
|
|
|
|
+ placeholder="请输入数量"
|
|
|
|
+ ></el-input>
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+ <template>
|
|
|
|
+ {{refundableQty}}
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ </el-table-column>
|
|
<el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.price | numToFixed }}
|
|
{{ scope.row.price | numToFixed }}
|
|
@@ -107,19 +122,20 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ <div style="margin:10px">
|
|
|
|
+ <el-button type="primary" @click="updateNum">保存</el-button>
|
|
|
|
+</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import print from 'vue-print-nb'
|
|
import print from 'vue-print-nb'
|
|
-import { getDetail } from "@/api/supply/sales";
|
|
|
|
|
|
+import { getDetail ,updateNum} from "@/api/supply/sales";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'SalesDetail',
|
|
name: 'SalesDetail',
|
|
componentName: 'SalesDetail',
|
|
componentName: 'SalesDetail',
|
|
- props: ['listItem'],
|
|
|
|
|
|
+ props: ['listItem','edit'],
|
|
directives: {
|
|
directives: {
|
|
print
|
|
print
|
|
},
|
|
},
|
|
@@ -153,7 +169,21 @@ export default {
|
|
goBack() {
|
|
goBack() {
|
|
this.$emit('backListFormDetail');
|
|
this.$emit('backListFormDetail');
|
|
},
|
|
},
|
|
|
|
+ updateNum(){
|
|
|
|
+ this.detailData.saleOrderData.forEach(item => {
|
|
|
|
+ item.invoiceNum = +item.refundableQty
|
|
|
|
+ });
|
|
|
|
+ updateNum({
|
|
|
|
+ ...this.detailData
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ this.$successMsg("修改成功");
|
|
|
|
+ this.$parent.edit = false
|
|
|
|
+ this.goBack();
|
|
|
|
+ this.$parent.getList();
|
|
|
|
+ })
|
|
|
|
|
|
|
|
+
|
|
|
|
+ },
|
|
// 获取详情
|
|
// 获取详情
|
|
getDetail() {
|
|
getDetail() {
|
|
getDetail({id: this.listItem.id}).then(res => {
|
|
getDetail({id: this.listItem.id}).then(res => {
|