|  | @@ -44,12 +44,22 @@
 | 
	
		
			
				|  |  |                              @click="excelBox = true">导入</el-button>
 | 
	
		
			
				|  |  |                      </template>
 | 
	
		
			
				|  |  |                      <template slot="sendNum" slot-scope="{ row }">
 | 
	
		
			
				|  |  | -                        <el-input v-if="!mingxibaocun" size="small" v-model="row.sendNum" style="width: 100%"
 | 
	
		
			
				|  |  | -                            @blur="sendNumBlur(row)"></el-input>
 | 
	
		
			
				|  |  | +                        <el-input v-if="!mingxibaocun && whetherFinancing != 1" size="small" v-model="row.sendNum"
 | 
	
		
			
				|  |  | +                            style="width: 100%" @blur="sendNumBlur(row)"></el-input>
 | 
	
		
			
				|  |  |                          <span v-else
 | 
	
		
			
				|  |  |                              :style="{ color: (Number(row.inventory) < Number(row.sendNum)) ? '#4c9e44' : '#dd4b3a' }">{{
 | 
	
		
			
				|  |  |                                  row.sendNum }}</span>
 | 
	
		
			
				|  |  |                      </template>
 | 
	
		
			
				|  |  | +                    <template slot="sendNumFinancing" slot-scope="{row}">
 | 
	
		
			
				|  |  | +                        <el-input-number v-if="!mingxibaocun&& whetherFinancing == 1" v-model="row.sendNumFinancing" size="small"
 | 
	
		
			
				|  |  | +                            :controls="false" :precision="0" style="width: 100%" @change="calculator(row)" />
 | 
	
		
			
				|  |  | +                        <span v-else>{{ row.sendNumFinancing }}</span>
 | 
	
		
			
				|  |  | +                    </template>
 | 
	
		
			
				|  |  | +                    <template slot="sendNumHave" slot-scope="{row}">
 | 
	
		
			
				|  |  | +                        <el-input-number v-if="!mingxibaocun&& whetherFinancing == 1" v-model="row.sendNumHave" size="small" :controls="false"
 | 
	
		
			
				|  |  | +                            :precision="0" style="width: 100%" @change="calculator(row)" />
 | 
	
		
			
				|  |  | +                        <span v-else>{{ row.sendNumHave }}</span>
 | 
	
		
			
				|  |  | +                    </template>
 | 
	
		
			
				|  |  |                      <template slot="profitLossNum" slot-scope="{ row }">
 | 
	
		
			
				|  |  |                          <span
 | 
	
		
			
				|  |  |                              :style="{ color: (Number(row.inventory) < Number(row.sendNum)) ? '#4c9e44' : '#dd4b3a' }">{{
 | 
	
	
		
			
				|  | @@ -60,7 +70,6 @@
 | 
	
		
			
				|  |  |                              style="width: 100%"></el-input>
 | 
	
		
			
				|  |  |                          <span v-else>{{ row.remarks }}</span>
 | 
	
		
			
				|  |  |                      </template>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |                      <template slot-scope="{type,size,row,index,disabled}" slot="menu">
 | 
	
		
			
				|  |  |                          <el-button v-if="mingxibaocun" :size="size" :type="type" :disabled="form.status == '已确认'"
 | 
	
		
			
				|  |  |                              :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
 | 
	
	
		
			
				|  | @@ -157,6 +166,7 @@ export default {
 | 
	
		
			
				|  |  |      name: "detailsPage",
 | 
	
		
			
				|  |  |      data() {
 | 
	
		
			
				|  |  |          return {
 | 
	
		
			
				|  |  | +            whetherFinancing: 0,
 | 
	
		
			
				|  |  |              switchDialog: false, //打印
 | 
	
		
			
				|  |  |              // 添加商品弹窗左侧配置
 | 
	
		
			
				|  |  |              treeOption: {
 | 
	
	
		
			
				|  | @@ -289,7 +299,24 @@ export default {
 | 
	
		
			
				|  |  |                          prop: "balanceQuantity",
 | 
	
		
			
				|  |  |                          overHidden: true,
 | 
	
		
			
				|  |  |                          width: 100
 | 
	
		
			
				|  |  | -                    }, {
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    {
 | 
	
		
			
				|  |  | +                        label: '参考库存融资',
 | 
	
		
			
				|  |  | +                        prop: "balanceQuantityFinancing",
 | 
	
		
			
				|  |  | +                        width: 120,
 | 
	
		
			
				|  |  | +                        overHidden: true,
 | 
	
		
			
				|  |  | +                        hide: true,
 | 
	
		
			
				|  |  | +                        showColumn: false,
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    {
 | 
	
		
			
				|  |  | +                        label: '参考库存自有',
 | 
	
		
			
				|  |  | +                        prop: "balanceQuantityHave",
 | 
	
		
			
				|  |  | +                        width: 120,
 | 
	
		
			
				|  |  | +                        overHidden: true,
 | 
	
		
			
				|  |  | +                        hide: true,
 | 
	
		
			
				|  |  | +                        showColumn: false,
 | 
	
		
			
				|  |  | +                    },
 | 
	
		
			
				|  |  | +                    {
 | 
	
		
			
				|  |  |                          label: '库存单价',
 | 
	
		
			
				|  |  |                          prop: "inventoryCostPrice",
 | 
	
		
			
				|  |  |                          overHidden: true,
 | 
	
	
		
			
				|  | @@ -607,7 +634,24 @@ export default {
 | 
	
		
			
				|  |  |                      overHidden: true,
 | 
	
		
			
				|  |  |                      disabled: false,
 | 
	
		
			
				|  |  |                      width: 100,
 | 
	
		
			
				|  |  | -                }, {
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    label: '参考库存融资',
 | 
	
		
			
				|  |  | +                    prop: "inventoryFinancing",
 | 
	
		
			
				|  |  | +                    width: 120,
 | 
	
		
			
				|  |  | +                    disabled: true,
 | 
	
		
			
				|  |  | +                    hide: true,
 | 
	
		
			
				|  |  | +                    showColumn: false,
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    label: '参考库存自有',
 | 
	
		
			
				|  |  | +                    prop: "inventoryHave",
 | 
	
		
			
				|  |  | +                    width: 120,
 | 
	
		
			
				|  |  | +                    disabled: true,
 | 
	
		
			
				|  |  | +                    hide: true,
 | 
	
		
			
				|  |  | +                    showColumn: false,
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  |                      label: '账面金额',
 | 
	
		
			
				|  |  |                      prop: 'price',
 | 
	
		
			
				|  |  |                      overHidden: true,
 | 
	
	
		
			
				|  | @@ -653,6 +697,20 @@ export default {
 | 
	
		
			
				|  |  |                      }]
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | +                    label: '融资数量',
 | 
	
		
			
				|  |  | +                    prop: 'sendNumFinancing',
 | 
	
		
			
				|  |  | +                    disabled: false,
 | 
	
		
			
				|  |  | +                    hide: true,
 | 
	
		
			
				|  |  | +                    showColumn: false,
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    label: '自有数量',
 | 
	
		
			
				|  |  | +                    prop: 'sendNumHave',
 | 
	
		
			
				|  |  | +                    disabled: false,
 | 
	
		
			
				|  |  | +                    hide: true,
 | 
	
		
			
				|  |  | +                    showColumn: false,
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  |                      label: '实际金额',
 | 
	
		
			
				|  |  |                      prop: 'subTotalMoney',
 | 
	
		
			
				|  |  |                      overHidden: true,
 | 
	
	
		
			
				|  | @@ -715,6 +773,23 @@ export default {
 | 
	
		
			
				|  |  |                  this.findObject(this.inventoryOption.column, "brandItem").label = '规格型号1'
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | +        isProcurement({ "param": "whether.financing" }).then(res => {
 | 
	
		
			
				|  |  | +            if (res.data.data == 1) {
 | 
	
		
			
				|  |  | +                this.whetherFinancing = res.data.data
 | 
	
		
			
				|  |  | +                this.findObject(this.inventoryOption.column, "balanceQuantityFinancing").hide = false
 | 
	
		
			
				|  |  | +                this.findObject(this.inventoryOption.column, "balanceQuantityFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                this.findObject(this.inventoryOption.column, "balanceQuantityHave").hide = false
 | 
	
		
			
				|  |  | +                this.findObject(this.inventoryOption.column, "balanceQuantityHave").showColumn = true
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "inventoryFinancing").hide = false
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "inventoryFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "inventoryHave").hide = false
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "inventoryHave").showColumn = true
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "sendNumFinancing").hide = false
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "sendNumFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "sendNumHave").hide = false
 | 
	
		
			
				|  |  | +                this.findObject(this.optionContacts.column, "sendNumHave").showColumn = true
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |          if (this.detailData.id) {
 | 
	
		
			
				|  |  |              this.editButton = true
 | 
	
		
			
				|  |  |              this.refresh(this.detailData.id)
 | 
	
	
		
			
				|  | @@ -824,6 +899,11 @@ export default {
 | 
	
		
			
				|  |  |                      dot: item.dot, // 批次号
 | 
	
		
			
				|  |  |                      costprie: item.inventoryCostPrice,// 库存成本
 | 
	
		
			
				|  |  |                      inventory: item.balanceQuantity, // 账面数量
 | 
	
		
			
				|  |  | +                    inventoryFinancing: item.balanceQuantityFinancing,
 | 
	
		
			
				|  |  | +                    inventoryHave: item.balanceQuantityHave,
 | 
	
		
			
				|  |  | +                    sendNum:0,
 | 
	
		
			
				|  |  | +                    sendNumFinancing:0,
 | 
	
		
			
				|  |  | +                    sendNumHave:0,
 | 
	
		
			
				|  |  |                      price: item.inventoryAmount, // 账面金额
 | 
	
		
			
				|  |  |                  })
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -854,6 +934,20 @@ export default {
 | 
	
		
			
				|  |  |              this.$set(row, 'profitLossNum', Number(row.sendNum) - Number(row.inventory))
 | 
	
		
			
				|  |  |              this.$set(row, 'profitLossAmount', Number(row.subTotalMoney) - Number(row.price))
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | +        calculator(row) {
 | 
	
		
			
				|  |  | +            if (row.sendNumFinancing > row.inventoryFinancing) {
 | 
	
		
			
				|  |  | +                this.$set(row, 'sendNumFinancing', null)
 | 
	
		
			
				|  |  | +                this.$message.error("融资数量不能大于参考库存融资");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (row.sendNumHave > row.inventoryHave) {
 | 
	
		
			
				|  |  | +                this.$set(row, 'sendNumHave', null)
 | 
	
		
			
				|  |  | +                this.$message.error("自由数量不能大于参考库存自有");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            row.sendNum = Number(Number(row.sendNumFinancing) + Number(row.sendNumHave))
 | 
	
		
			
				|  |  | +            row.subTotalMoney = row.sendNum * row.costprie
 | 
	
		
			
				|  |  | +            row.profitLossNum=Number(row.sendNum) - Number(row.inventory)
 | 
	
		
			
				|  |  | +            row.profitLossAmount=Number(row.subTotalMoney) - Number(row.price)
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  |          //表头编辑
 | 
	
		
			
				|  |  |          confirmEditing() {
 | 
	
		
			
				|  |  |              this.editButton = false // 让保存按钮出来
 | 
	
	
		
			
				|  | @@ -1108,6 +1202,22 @@ export default {
 | 
	
		
			
				|  |  |                      this.findObject(this.inventoryOption.column, "brandItem").label = '规格型号1'
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  | +            isProcurement({ "param": "whether.financing" }).then(res => {
 | 
	
		
			
				|  |  | +                if (res.data.data == 1) {
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityFinancing").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityHave").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityHave").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryFinancing").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryHave").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryHave").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumFinancing").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumHave").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumHave").showColumn = true
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  |              if (inSave) {
 | 
	
		
			
				|  |  |                  this.$message.success("保存成功");
 | 
	
		
			
				|  |  |                  //关闭窗口
 | 
	
	
		
			
				|  | @@ -1123,6 +1233,22 @@ export default {
 | 
	
		
			
				|  |  |                      this.findObject(this.inventoryOption.column, "brandItem").label = '规格型号1'
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  | +            isProcurement({ "param": "whether.financing" }).then(res => {
 | 
	
		
			
				|  |  | +                if (res.data.data == 1) {
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityFinancing").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityHave").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.inventoryOption.column, "balanceQuantityHave").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryFinancing").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryHave").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "inventoryHave").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumFinancing").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumFinancing").showColumn = true
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumHave").hide = false
 | 
	
		
			
				|  |  | +                    this.findObject(this.optionContacts.column, "sendNumHave").showColumn = true
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  |              const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
 | 
	
		
			
				|  |  |              if (inSave) {
 | 
	
		
			
				|  |  |                  this.$message.success("重置成功");
 |