|
|
@@ -231,16 +231,40 @@
|
|
|
width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ v-if="checkNB"
|
|
|
+ prop="stockname"
|
|
|
+ label="仓库"
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.stockid" size="mini" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in stockOptions"
|
|
|
+ :key="item.stockid"
|
|
|
+ :label="item.stockname"
|
|
|
+ :value="item.stockid"
|
|
|
+ @click.native="rowChange(scope.row,scope.$index)">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="checkNB"
|
|
|
prop="position"
|
|
|
label="仓位"
|
|
|
- width="100">
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="mini" v-model="scope.row.position" @input="rowChange(scope.row,scope.$index)" placeholder="输入仓位"></el-input>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ v-if="checkNB"
|
|
|
prop="batchno"
|
|
|
label="批号"
|
|
|
- width="100">
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="mini" v-model="scope.row.batchno" @input="rowChange(scope.row,scope.$index)" placeholder="输入批号"></el-input>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column
|
|
|
label="备注"
|
|
|
width="300"
|
|
|
@@ -293,6 +317,16 @@ export default {
|
|
|
excel:() => import('../export_excel'),
|
|
|
addProduct
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ checkNB () {
|
|
|
+ let siteid = JSON.parse(sessionStorage.getItem('active_account')).siteid
|
|
|
+ if (siteid === 'NB' && this.data.type === '特殊订单' && this.data.typemx === '样品') {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
drawer:false,
|
|
|
@@ -321,7 +355,8 @@ export default {
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
time: null,
|
|
|
- value2:''
|
|
|
+ value2:'',
|
|
|
+ stockOptions:[]
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -355,19 +390,8 @@ export default {
|
|
|
this.$emit('onSuccess')
|
|
|
})
|
|
|
},
|
|
|
- onInput (data,index) {
|
|
|
- // if (this.data.type !== '特殊订单') {
|
|
|
- // if(data.price > data.oldprice)
|
|
|
- // data.price = data.oldprice;
|
|
|
- // if(data.price < 0)
|
|
|
- // data.price = 0;
|
|
|
- // }
|
|
|
- this.$set(this.tableData,index,data)
|
|
|
- },
|
|
|
rowChange (val,index) {
|
|
|
let that = this
|
|
|
-
|
|
|
- // // 防抖
|
|
|
if(this.time !== null){
|
|
|
clearTimeout(this.time);
|
|
|
}
|
|
|
@@ -384,12 +408,15 @@ export default {
|
|
|
"needdate": val.needdate,//可以不传,修改交期
|
|
|
"price":val.price,
|
|
|
"remarks":val.remarks,
|
|
|
- "defaultprice":val.defaultprice
|
|
|
+ "defaultprice":val.defaultprice,
|
|
|
+ "stockid":val.stockid,
|
|
|
+ "position":val.position,
|
|
|
+ "batchno":val.batchno
|
|
|
}]
|
|
|
},()=>{
|
|
|
this.$set(this.tableData,index,val)
|
|
|
})
|
|
|
- },1000)
|
|
|
+ },500)
|
|
|
},
|
|
|
onDateChange (val){
|
|
|
let that = this
|
|
|
@@ -477,10 +504,14 @@ export default {
|
|
|
this.$emit('onSuccess')
|
|
|
})
|
|
|
},
|
|
|
+ async queryStock () {
|
|
|
+ const res = await this.$store.dispatch('optiontypeselect','stockselect')
|
|
|
+ this.stockOptions = res.data
|
|
|
+ }
|
|
|
},
|
|
|
mounted () {
|
|
|
this.listData()
|
|
|
- console.log("表结构")
|
|
|
+ this.queryStock()
|
|
|
this.columnTitle = []
|
|
|
this.$refs.multipleTable.$children.forEach(obj => {
|
|
|
|