|
@@ -35,12 +35,36 @@
|
|
|
</template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
<el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
|
|
|
- :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">
|
|
|
+ {{row.$cellEdit?'保存':'编辑'}}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
|
|
|
@click="rowDelBox(row, index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template slot="goodsNum" slot-scope="{row}">
|
|
|
+ <el-input-number v-if="row.$cellEdit" v-model="row.goodsNum" size="small" :controls="false" :precision="0" style="width: 100%" />
|
|
|
+ <span v-else>{{row.goodsNum}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="dot" slot-scope="{row}">
|
|
|
+ <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
|
|
|
+ <!--本例还使用了default-first-option属性, 在该属性打开的情况下,按下回车就可以选中当前选项列表中的第一个选项,-->
|
|
|
+ <!--无需使用鼠标或键盘方向键进行定位。-->
|
|
|
+ <!--allow-create filterable default-first-option-->
|
|
|
+ <el-select v-if="row.$cellEdit" v-model="row.dot" size="small" filterable default-first-option
|
|
|
+ @focus="picihaolistfun(row.goodsId)"
|
|
|
+ @change="picihaolistChangefun($event,row)">
|
|
|
+ <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
|
|
|
+ :value="item.dot"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ row.dot }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="price" slot-scope="{row}">
|
|
|
+ <el-input-number v-if="row.$cellEdit" v-model="row.price" size="small" :controls="false" style="width: 100%" />
|
|
|
+ <span v-else>{{row.price}}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
|
|
@@ -79,6 +103,7 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ picihaolist:[], // 批次号数据
|
|
|
tableData:[],
|
|
|
// 上传附件的需要参数
|
|
|
loadingBtn:false,
|
|
@@ -122,7 +147,7 @@ export default {
|
|
|
{
|
|
|
label: '调出仓库',
|
|
|
prop: "storageId",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
type: 'select',
|
|
|
props: {
|
|
|
label: 'cname',
|
|
@@ -137,7 +162,7 @@ export default {
|
|
|
},{
|
|
|
label: '调入仓库',
|
|
|
prop: "callInStorageId",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
type: 'select',
|
|
|
props: {
|
|
|
label: 'cname',
|
|
@@ -153,7 +178,7 @@ export default {
|
|
|
label: '库管',
|
|
|
prop: "stockClerkId",
|
|
|
type: 'select',
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
props: {
|
|
|
label: 'realName',
|
|
|
value: 'id'
|
|
@@ -169,7 +194,7 @@ export default {
|
|
|
label: '业务日期',
|
|
|
prop: "businesDate",
|
|
|
searchProp: "businesDateList",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
type: "datetime",
|
|
|
value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
|
|
format: "yyyy-MM-dd HH:mm",
|
|
@@ -197,7 +222,7 @@ export default {
|
|
|
prop: "remarks",
|
|
|
type: 'textarea',
|
|
|
disabled: false,
|
|
|
- span: 16,
|
|
|
+ span: 24,
|
|
|
minRows: 1
|
|
|
}]
|
|
|
},
|
|
@@ -246,6 +271,29 @@ export default {
|
|
|
disabled: true,
|
|
|
prop: 'goodsNo',
|
|
|
width: 100
|
|
|
+ },{
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'dot',
|
|
|
+ type: 'select',
|
|
|
+ // disabled: true,
|
|
|
+ dicData: [],
|
|
|
+ props: {
|
|
|
+ label: "dot",
|
|
|
+ value: "dot"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/blade-sales-part/stockDesc/dotList",
|
|
|
+ },{
|
|
|
+ label: '库存数量',
|
|
|
+ prop: "inventory",
|
|
|
+ disabled: true,
|
|
|
+ }, {
|
|
|
+ label: '调拨数量',
|
|
|
+ prop: 'goodsNum',
|
|
|
+ disabled: false,
|
|
|
+ },{
|
|
|
+ label: '单价',
|
|
|
+ prop: "price",
|
|
|
+ disabled: true,
|
|
|
}, {
|
|
|
label: '品牌',
|
|
|
prop: 'brandId',
|
|
@@ -272,27 +320,7 @@ export default {
|
|
|
label: '轮胎描述',
|
|
|
prop: 'goodsDescription',
|
|
|
disabled: true,
|
|
|
- }, {
|
|
|
- label: '批次号',
|
|
|
- prop: 'dot',
|
|
|
- type: 'select',
|
|
|
- // disabled: true,
|
|
|
- dicData: [],
|
|
|
- props: {
|
|
|
- label: "dot",
|
|
|
- value: "dot"
|
|
|
- },
|
|
|
- dicUrl: "/api/blade-sales-part/stockDesc/dotList",
|
|
|
-
|
|
|
- },{
|
|
|
- label: '库存数量',
|
|
|
- prop: "inventory",
|
|
|
- disabled: true,
|
|
|
- }, {
|
|
|
- label: '调拨数量',
|
|
|
- prop: 'goodsNum',
|
|
|
- disabled: false,
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '单位',
|
|
|
prop: 'units',
|
|
|
type: "select",
|
|
@@ -304,7 +332,7 @@ export default {
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
|
|
|
}, {
|
|
|
label: '备注',
|
|
|
- prop: 'remarks'
|
|
|
+ prop: 'remarks',
|
|
|
}]
|
|
|
},
|
|
|
}
|
|
@@ -323,6 +351,17 @@ export default {
|
|
|
if (this.detailData.id) {
|
|
|
this.refresh()
|
|
|
}else {
|
|
|
+ this.optionForm.column.forEach(item => {
|
|
|
+ if (item.prop == 'storageId'
|
|
|
+ || item.prop == 'remarks'
|
|
|
+ || item.prop == 'callInStorageId'
|
|
|
+ || item.prop == 'stockClerkId'
|
|
|
+ || item.prop == 'businesDate') {
|
|
|
+ item.disabled = false
|
|
|
+ } else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
this.editButton = false
|
|
|
this.isSave = false
|
|
|
}
|
|
@@ -360,22 +399,41 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
rowEdit(row, index) {
|
|
|
- if (this.form.statusName == '待出库') {
|
|
|
- this.optionContactsBack.column.forEach(its => {
|
|
|
- if (its.prop == 'dot') {
|
|
|
- this.$set(its, 'disabled', false)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- console.log('this.formContacts.goodsId', this.formContacts.goodsId);
|
|
|
- dotList({
|
|
|
- storageId: this.form.storageId,
|
|
|
- goodsId: row.goodsId
|
|
|
- }).then(res => {
|
|
|
- this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
|
|
|
- })
|
|
|
- this.$refs.formContacts.rowEdit(row, index)
|
|
|
+ this.$set(row,'$cellEdit',!row.$cellEdit)
|
|
|
+ // if (this.form.statusName == '录入') {
|
|
|
+ // this.optionContactsBack.column.forEach(its => {
|
|
|
+ // if (its.prop == 'dot') {
|
|
|
+ // this.$set(its, 'disabled', false)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // console.log('this.formContacts.goodsId', this.formContacts.goodsId);
|
|
|
+ // dotList({
|
|
|
+ // storageId: this.form.storageId,
|
|
|
+ // goodsId: row.goodsId
|
|
|
+ // }).then(res => {
|
|
|
+ // this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
|
|
|
+ // })
|
|
|
+ // this.$refs.formContacts.rowEdit(row, index)
|
|
|
+
|
|
|
},
|
|
|
+ // 批次号获取数据
|
|
|
+ picihaolistfun(goodsId){
|
|
|
+ dotList({
|
|
|
+ storageId:this.form.storageId,
|
|
|
+ goodsId: goodsId
|
|
|
+ }).then(res=>{
|
|
|
+ this.picihaolist = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 批次号
|
|
|
+ picihaolistChangefun(value,row){
|
|
|
+ for (let item of this.picihaolist) {
|
|
|
+ if (item.dot == value) {
|
|
|
+ this.$set(row,'inventory',item.balanceQuantity)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 确认调拨
|
|
|
complete() {
|
|
|
if (!this.form.id) {
|
|
@@ -556,16 +614,18 @@ export default {
|
|
|
this.optionForm.column.forEach(item => {
|
|
|
if (item.prop == 'storageId'
|
|
|
|| item.prop == 'remarks'
|
|
|
- || item.prop == 'createTime'
|
|
|
+ || item.prop == 'callInStorageId'
|
|
|
|| item.prop == 'stockClerkId'
|
|
|
- || item.prop == 'shipType'
|
|
|
- || item.prop == 'logisticsCorpName'
|
|
|
- || item.prop == 'expressNo') {
|
|
|
+ || item.prop == 'businesDate') {
|
|
|
item.disabled = false
|
|
|
} else {
|
|
|
item.disabled = true
|
|
|
}
|
|
|
})
|
|
|
+ if (this.form.shipItemsList.length != 0) {
|
|
|
+ this.findObject(this.optionForm.column, "storageId").disabled = true
|
|
|
+ }
|
|
|
+
|
|
|
this.isAddDisabled = false
|
|
|
this.optionContactsBack.column.forEach(its => {
|
|
|
if (its.prop == 'dot') {
|
|
@@ -597,7 +657,7 @@ export default {
|
|
|
for(let item of this.tableData) {
|
|
|
let obj = {
|
|
|
goodsId:item.id,
|
|
|
- price:item.price,
|
|
|
+ price:item.price, // 单价
|
|
|
goodsName:item.cname,
|
|
|
goodsNum:item.goodsNum,
|
|
|
brandName:item.brandName,
|